AIP 21: New Uniswap V3 Incentives System

This proposal follows the discussion we had here. To sum it up:

I propose to switch for Uniswap V3 from a staking system to a system were rewards are computed on chain.

There are 4 ways to be eligible for the rewards:

  • LP directly on Uniswap through the NonfungiblePositionManager
  • LP through Arrakis and hold Arrakis LP token
  • LP through Arrakis and stake the Arrakis LP token on the Angle gauge (for backward compatibility)
  • LP through Gamma once they’ve deployed the pool

Then the computation would be as follow:

  • The weekly distribution is split against every swap that happened during the week proportionally to their volume.
  • For each swap, the rewards are split between all LPs position in range, proportionally to:
    (0.4 * (fees earned by the position)/(fees of the swap) + 0.4 * (agEUR in the position)/(agEUR in the pool)+ 0.2 * (other token in the position)/(other token in the pool)) * veANGLE boost

The first factor is in favor of more concentrated positions as they’ll earn more fees, but less risky positions still get a decent share of rewards.

The script I’ve made to compute rewards is here: Uniswap V3 Reward Computation · GitHub

Finally the reward amounts would be brought on-chain using a merkle root.

The smart contract code would be this one: Reward Distributor · GitHub. I don’t think it needs to be audited as it’s quite standard, won’t manage funds outside from the weekly distribution and has been tested on our side.

As a reminder, the pros and cons of this new system are the following:

Pros:

  • Maximal flexibility on the DAO side: the distribution rules could be changed anytime
  • Maximal flexibility on the LP side: they can choose their range or their management solution
  • Optimized UX: as there would be no need to stake the Uni V3 position, it minimizes the number of on-chain txs
  • Minimal Composability risk: as we don’t rely on any external party to stake the position, there is no risk of smart contract failure
  • Current LPs would not have to do anything: we’ll include them in the computations so they don’t even have to unstake their position

Cons:

  • It requires trust in a centralized party to compute and upload the merkle root. However this trust is relative as the party would only be able to steal one week distribution of ANGLE

The goal would be to move this to voting in the coming days to eventually switch before the next epoch.

3 Likes

Really like this new approach which gives more flexibility to agEUR Uniswap LPs without having to make users spend more gas!

The fact that distribution is handle off-chain but in a way that is verifiable with on-chain data makes it acceptable for me.

Very cool solution, allows for much flexibility.

Question on the reward distribution formula though:

  • Wouldn’t a way out-of-range get rewarded with your formula while providing 0 value?
    Like a 0.5-0.6 range on agEUR-USDC.
  • Why incentivize more agEUR in the pool vs the other token?

Seems like the first term of the equation is the only one that really captures value added to the protocol, not sure why the other two are necessary.

Thanks @Tokenwood !

So to clarify:

Out of range positions during a swap are not counted.

Then, the reasoning is that:

  • what we’re interested in as a protocol is primarily the TVL, so the number of agEUR per ANGLE we spend in incentives, hence it makes sense to rewards agEUR in LP positions more than USDC. For 2 equivalent positions, we prefer the one with a range such that it contains more agEUR.
  • then we’re interested in the “quality” of the pool, so the slippage for large swaps and its ability to strengthen the peg, hence we want to favorise tight positions with small range. The metric to capture this is fees as these positions will capture more fees

Good to know out of range positions are not counted.

So would you reward more someone who LPs agEUR-USDC with a $0-$1.02 range than someone who LPs the $0.98-$1.02 range, with the same amount of liquidity in the $0.98-$1.02 range? they are both providing the same utility. Just holding agEUR for the sake of TVL doesn’t bring much value IMO.

Yes I think it’s fair as it would require way more liquidity for the $0-$1.02 range. To me it brings value as the 3 metrics we are optimizing for are TVL, volume and peg. Especially considering that the protocol derives its revenue from TVL