Member-only story
What dYdX and StarkWare’s Partnership Means for DeFi’s Perps & Future(s)
Not on Medium yet? Sign up for unlimited access right here: https://jarettdunn.medium.com/membership

dYdX and Antonio Juliano Zhuoxun Yin Brendan Chou Everett Hu just sent me this handy mail announcing a partnership with StarkWare and their scalability engine, StarkEx.
What this means is that dYdX’s fledgling perpetuals (and later: futures contracts) will be able to execute faster, cheaper, and with more leverage than before.
In practicality, check out this code I wrote to consume some of their dydx-python package:
Insert a private key, and you’ll see output akin to:
Edit some of that code slightly, and you’ll see:
What this means is that as dYdX adds more perpetuals and matching futures contracts to their lineup, we can allocate our equity in baskets matching how much % out of total % opportunity the funding rates allow us — while matching that against the futures premiums, and weighing which to enter and which to avoid as it might not be profitable. We can also enter into futures contracts to hedge against these positions, which will allow us to have a delta-neutral set of positions that are exposed only to funding rates and/or futures premiums — depending on the time of day :)
Why is this important?
It’ll be the first non-custodial solution I can exploit (well, I am indeed taking advantage of market conditions and %s of %s here…) — and I can even theoretically do so on-chain with a supporting tokenized asset that distributes winnings in the form of buy-n-burn (to appease regulators), reducing supply and increasing value of said token.