DFP-28: Integrate with Arrakis Finance

Header Content
Author Edson Ayllon (@relativeread)
Created 2022-5-4
Status Completed

Motivation

The main motivation for adding Arrakis is taking advantage of the yield farming opportunities it provides. While dHEDGE already provides Uniswap V3 liquidity management, and with multiple Uniswap LPs in a single contract, Arrakis is providing rewards on Uniswap V3 pools.

Description

Arrakis Finance is a protocol for managing Uniswap V3 liquidity built with Gelato. Liquidity provided auto compounds, which Uniswap LPs don’t do by default. Arrakis positions also rebalance, keeping LPs in range to earn fees, as Uniswap LPs that go out of range don’t earn fees.

If this proposal passes, all Arrakis LP position ERC20s are to be whitelisted, and Arrakis as a dapp is to be whitelisted on any chain Arrakis Uniswap management is deployed on. Arrakis is currently only deployed on Polygon.

Implementation

Arrakis will be integrated by writing and testing a contract guard that whitelists Arrakis contracts and functionality.

Contract guard functions include:

  • addLiquidityAndStake
    • Can only have a maximum of 2 liquidity positions / gauges at any one time
    • Can only have liquidity positions for whitelisted gauges
    • Ensure that the LP underlying tokens (eg USDC & miMATIC) are supported by the pool
    • Ensure the receiver is the dHEDGE pool
  • removeLiquidityAndUnstake
  • claim_rewards
    • Ensure receiving address is the dHEDGE pool
    • Check that the reward tokens are enabled
  • getBalance
    • The balance will be similar to the UniswapV3AssetGuard, where we would calculate the value of the position in USD terms
  • withdrawProcessing
    • On withdrawal processing, it should call claim_rewards for all the active claim_tokens to claim any rewards to the pool

Individual pools can be whitelisted in the assets guard.

Vote

Vote passed

1 Like

Vote for this DFP will go live here: Snapshot.

In the latest release, multiple DFPs were deployed without a vote being on governance. These DFPs were on this forum for sufficient time, however, it seems the none were posted up on gov.dhedge.org.

To prevent this in the future, all future DFPs being planned to go into a release by the core team will come with a Snapshot vote made the same day the DFP is posted, activating about a week after the DFP is posted on the forum.

While all DFPs that went into Moonlight were noncontentious as seen by no reply or positive reply on the forum/discord, if the community wishes, we may put a vote up on Snapshot to remove these features from production.

1 Like