Xenophon Labs

Posted on Mar 01, 2023Read on Mirror.xyz

Building Upon dYdX's Incentive Programs

Article by Thomas Cintra (@tncintra) | Paper by Max Holloway (@max_holloway) and Thomas Cintra

dYdX is transitioning to a dApp chain built on top of the Cosmos ecosystem with its long-awaited V4. dYdX V4 presents a great opportunity to make improvements on the protocol’s existing mechanisms. In our latest paper, we propose a few key changes to dYdX’s incentive programs that we believe will improve security and support the continued growth of the dYdX ecosystem.

tl;dr: We review dYdX’s three main incentives programs. At a high level, we are proposing the following 5 changes for dYdX V4, each of which can be evaluated independently.

  • Security - (1) Implement a USDC-based safety staking module to backstop the protocol. Set up a multisig of 1-3 high-context community members to actively manage the pool’s emissions. (2) Fund $1M in a bug bounty program on Immunefi.

  • Liquidity - (3) Implement a volume-based LP rewards mechanism, under the assumption that orderbook depth, spread, and uptime will not be tracked in the dYdX Chain’s consensus.

  • User Adoption & Stickiness - (4) Wind down the current Trading Rewards module emissions. (5) Experiment with a non-DYDX, points-based approach for V4 trading rewards, similar to airline miles or points earned at retail stores.

A Safer Safety Staking Module

The safety staking module was an insurance pool that held reserves in the dYdX native token, DYDX. The module was decommissioned late in 2022 following our research on concerns regarding the module (see our blog post here). In its place, we proposed the implementation of a similar safety pool denominated in USDC. However, due to the developer time required to build V4, implementing a new insurance pool was put on hold. With no meaningful form of insurance, dYdX is a babe in the woods.

With V4 launch approaching, we revisit the insurance concern on dYdX and flesh-out the design for a USDC-denominated safety staking pool. As is usually the case with insurance, we must first ask ourselves: how much should we pay? For dYdX, the answer is in terms of the rewards constant R, which dictates how much DYDX is emitted to reward stakers.

The size of the USDC safety pool can be expressed as a function of this cost parameter R, as well as the pool’s APY and the DYDX-USDC spot price:

As we can see, the expected size of the safety staking pool is very sensitive to the pool’s APY (and therefore sensitive to DeFi interest rates writ large) and the token’s spot price (which itself is very volatile). As either of these variables change, the size of the module, and therefore dYdX’s insurance, changes accordingly. Furthermore, the SSM is meant to cover some portion of the protocol’s liabilities, which is expressed by its total value locked (TVL) which was ~$450M as of Feb 28th 2022. This quantity is also consistently changing and was as much as $1B in this past year.

The rewards constant, R, is the only meaningful lever the dYdX community has to adjust the size of the safety module to the current market environment. As interest rates (e.g. Aave supply rates) or the protocol’s TVL rise, or DYDX price falls, the safety staking module might be insufficiently covering the protocol’s exposure. To ensure dYdX is appropriately insured under such environments, the protocol must pay for more insurance by raising the rewards constant. Similarly, the protocol might be overpaying for insurance as market conditions loosen.

To avoid over or under paying for insurance, we propose setting up a multisig of 1-3 high context community members who propose parameter changes for the module’s rewards constant. This is an opportunity to actively manage dYdX’s risk capital. Actively managing the protocol’s risk is of particular importance as we migrate to a Cosmos app chain, where dYdX Trading Inc. can’t make on-the-fly decisions to manage liquidation risk, and where there is greater risk of smart contract exploits.

The safety staking module is a powerful risk mitigation tool, but preventative measures are also useful in keeping the protocol safe. In our research, we also propose a $1M bug bounty program through Immunefi to prevent smart contract exploits in the first place.

Liquidity Provider Rewards

To offer competitive prices, dYdX needs liquidity. In dYdX v3, liquidity is incentivized via the Liquidity Provider Rewards Module (LP rewards module). It accounts for over 1M in DYDX emissions per 28-day epoch, and is based on each LP’s depth, spread, uptime, and volume across dYdX markets over the course of the epoch. For dYdX V4, many of these parameters (such as order book depth) will not be tracked in the underlying consensus mechanism. This means there will be no consensus orderbook for the LP rewards module to be able to compute rewards. We might get around the consensus mechanism constraint, either by trusting a centralized oracle for orderbook data, or by asking each validator to report an orderbook and aggregating the results. However, we suspect that these approaches would create room for potential gameability and collusion by sophisticated counterparties.

Instead, we reduce the complexity of the LP rewards formula such that it relies exclusively on on-chain data. We propose creating a volume-based LP rewards mechanism, such that an LP’s rewards in a given market are proportional to their maker volume in that particular market. Notice that for market makers to increase their volume share, they will need to provide more competitive bid/ask spreads than other market makers to fill more orders. This leads to more liquid markets - assuming no collusion/bribery between LPs and validators - with trades filling at more competitive prices. The simplicity of this approach is particularly attractive as dYdX moves to implement liquidity incentives early into V4 to bolster user adoption.

However, this mechanism comes with certain drawbacks. First, removing the expressivity of order depth, spread, and uptime reduces the protocol’s ability to optimize user experience. For example, removing any consideration for order depth means LPs will only be competing for marginal decrements in bid/ask spreads to take market share. This means that providing 1 cent better pricing is rewarded at the same rate as providing 1 dollar better pricing. Similarly, LPs could choose to collude and provide wider bid/ask spreads - which often means more favorable prices for the LPs. Although, given market making is a competitive game with highly sophisticated players competing for orderflow, these drawback should not be overstated.

In the LP rewards section of our research we also look into the potential incentives for wash trading. At a high level, wash trading occurs when entities push volume between two of their own accounts to accrue rewards. We initially discussed this problem in our Trading Rewards review (find the blog post here), although one could imagine why LPs might also be incentivized to wash trade under a volume-based LP rewards mechanism. A basic approach to detecting wash trading is to partition makers and takers into a bipartite graph, and measure the proportion of volume pushed between each maker and taker. By considering the subgraphs between makers and takers, we could place a confidence interval on our suspicion that a set of makers and takers is actually the same entity.

A maker-taker bipartite graph where edge weights indicate the proportion of a taker's volume that went to that maker. We could compute metrics such as skewness/kurtosis on these edge distributions to place a confidence on suspiciously interconnected subgraphs.

The same bipartite graph, stylized.

Trading Rewards

We have published extensively on the Trading Rewards module, how it was/is gamed, and why it does not necessarily improve market liquidity (see our Trading Rewards review here). Recall that the trading rewards module distributes DYDX token to users based on the fees they pay in each epoch. As it stands, trading rewards incentivize activity that is very highly correlated with DYDX price; as DYDX falls, farming the rewards module becomes less profitable, and trading activity drops. This is because users farming DYDX token via trading rewards are not “sticky”: they trade so long as they earn a profit via the rewards module. This is not conducive for the protocol’s long-term growth, and needlessly dilutes value for existing tokenholders. For these and other reasons, DYDX accrued to the rewards module was axed by 25% (see the DIP 13 here), and there is appetite from the community to continue to wind the module down.

Fees paid by DYDX token holders and DYDX token price. Our previous research found that the trading rewards Nash equilibrium was dominated by DYDX token price, and therefore could meaningfully affect a trader's willingness to pay fees.

The millions in DYDX allocated to trading rewards could be better spent in other community growth ventures, such as marketing efforts or additional grants programs.

A Better Approach

The purpose behind the trading rewards module was to accelerate growth and promote liquidity. The naive approach of rewarding for fees paid or for open interest held throughout the epoch is unlikely to meaningfully improve market liquidity, especially compared to the more robust LP rewards module. Accelerating protocol growth is an important goal, but more importantly the users acquired by this mechanism must be sticky. Crucially, they shouldn’t be so sensitive to fluctuations in DYDX token price, and shouldn’t be using the protocol primarily to farm DYDX token. We propose an experiment to bolster user stickiness and spur growth in the dYdX ecosystem as we transition to V4.

The fundamental problem with the current module is that the reward is a fungible token, DYDX, where traders can optimize the amount they pay in fees to receive more capital than they put in. As we have seen in historical trading data, and explicitly in various forum posts, this is exactly what many sophisticated traders are doing. This “gaming” is an inefficient allocation of DYDX token, and is not the organic user behavior we believe the community is looking for. However, providing some reward for using the protocol is still a great idea, which is implemented in functionally every consumer facing industry; think Starbucks or McDonalds points, sports betting rebates such as those on ByBit, airline miles… the list goes on. Industries have converged on these approaches as it creates a marginal advantage for the company issuing the rewards, without allowing users to make more money than they spend.

Furthermore, we propose the creation of trading points. Every epoch, points are disbursed to users that trade on dYdX, as a percentage of their fees spent. Points earned can be used to pay trading fees in the next epoch, but if left unused will disappear after 1 epoch. This creates an additional incentive for users to trade on dYdX instead of other venues, as their fees might be cheaper, and there is a sunk cost in letting their points expire. Furthermore, it incentivizes the desired behavior: organic trading. Users are not incentivized to wash trade, for instance, as their upside is limited to a fee discount for the next epoch. Furthermore, this approach does not require the token holders to dilute their DYDX market share in exchange for an increase in protocol fees.

We believe this design offers a fun and interesting alternative to the current trading rewards module, mimicking what we see across most other consumer-facing industries. There is a lot of room to play with this design and improve it, such as multiplier points for traders that use the protocol for longer, boosts for traders that hold hedgies, letting users tweet their epoch fee rankings, etc.. This is a slight redesign of the current discount tier structure. We would appreciate any feedback on this new trader rewards mechanism.

Final Thoughts

We have proposed significant changes to several incentives programs on dYdX that we hope will improve the protocol’s long term health and spur trading activity. However, we encourage any feedback from the community on anything we might have missed, or could improve on. If you have any thoughts regarding the above, please respond to this Google form, or shoot Max & Thomas a DM on twitter. We appreciate any positive feedback, or constructive criticism on our work. Stay tuned for our follow-up paper, where we will discuss the role of DYDX in the Cosmos App chain. Should DYDX secure the dYdX chain? Should fees be shared with DYDX token holders? Let’s find out!

Links

Disclosure: Reference to the DYDX price is necessary for this research. The authors do not own DYDX token, nor are they affiliated with dYdX Trading Inc. or any of its affiliates. This research was funded by the dYdX Grants Trust. Any opinions and results stated here are those of the authors, not of dYdX, its affiliates, nor the dYdX Grants Trust. This is not financial advice.