RFP (Idea): Protocol-Owned Liquidity on Uniswap v3 Utilizing Gamma Strategies

Abstract

This is a proposal to provide protocol-owned liquidity (POL) in the RDNT-WETH 1% pool on Uniswap v3, utilizing Gamma Strategies as an active liquidity manager.

The liquidity position would initially consist solely of RDNT, with the express goal to obtain a 50/50 RDNT-WETH position. As more purchases of RDNT are made, the liquidity position will convert RDNT into WETH, and when the position reaches a 50/50 ratio, Gamma will actively manage the position via automated rebalance triggers to maintain that ratio.

Motivation & Rationale

  1. POL allows Radiant to become less dependent on liquidity providers

In Radiant V2, liquidity providers are incentivized with protocol fees to provide liquidity to an 80-20 RDNT-wstETH pool on Balancer. While this reduces Pool2 emissions and RDNT inflation, the level of liquidity is somewhat dependent on the ebb and flow of protocol revenues, which may or may not be sufficient to lower price impact to a sufficient level.

  1. Having protocol-owned, concentrated liquidity would be better able to absorb price impact

Assuming that we reach a 50/50 position on Uniswap v3, the concentration of liquidity around the current price will lower price impact much more than a full-range position.
Concentrating the range has the potential to increase capital efficiency by approximately 3.5x more than a full-range position, with less than a ⅓ of the TVL, when it comes to lowering price impact.

  1. A single-sided position is less costly to provide

Most DAOs are abundant in their own protocol tokens, but less abundant in the other side of the liquidity pair (i.e. WETH, USDC, wstETH, etc.), so the initial costs to provide liquidity are much lower.

  1. POL promotes self-sustainability and solves DeFi 1.0’s pain points

Radiant v2 certainly solves some of the issues of Radiant v1, which involved mercenary farming of liquidity rewards and inflationary emissions to stakers. Once a 50/50 ratio of assets is achieved in the POL liquidity position, less liquidity would be required from external liquidity providers. Because the protocol would already have a sustainable source of liquidity, less protocol revenues may be distributed to liquidity providers, and more of those funds can stay within the DAO to fund initiatives, extend runway, pay contributors, etc

Considerations

  1. A single-sided range will initially have no sell-side liquidity

Given that the single-sided range will be entirely in RDNT, the position itself will not have any liquidity to sell RDNT into. In cases where Gamma has managed a single-sided liquidity range, where such liquidity was the sole source of liquidity, it had negative effects on price and produced discontent amongst community members who felt that they were trapped into holding a token.

However, this situation is not applicable to Radiant because (1) there is sellside liquidity from the Balancer 80/20 pool, (2) there’s additional sellside liquidity on BSC in the Pancakeswap pool, and (3) there is still some amount of public sellside liquidity currently in the Uniswap RDNT-WETH 1% pool. The presence of other liquidity sources negates the negative effects where the single-sided liquidity is the sole source of liquidity.

  1. A single-sided liquidity range depends on RDNT to outperform ETH in order to reach a 50/50 ratio

It is possible that during a market crash or when there is large RDNT sell pressure, the position could go out of range to the downside. In this case, Gamma will automatically set rebalance triggers to reposition the single-sided range lower to a price that meets the current demand for RDNT. We can ensure that the lower end of the liquidity range will not go lower than what the price is currently on Balancer and Pancakeswap.

  1. A nominal amount of full-range liquidity should be added to the position

In the case that the Uniswap v3 price goes out of range to the downside, where there’s absolutely no liquidity, some amount of liquidity must be provided to make a trade that would move the price back to where the bulk of the liquidity is. To allow for arbitrageurs to more easily arb the price back to where it should be without having to provide that liquidity first, a nominal amount of full range liquidity should be provided. It need not be a large amount and can literally be a few cents of full-range liquidity. So long as there is at least some amount of liquidity that bridges the gap between current price and the lower end of the single-sided range, a trade can be made. This is less of a concern due to the amount of public liquidity currently in the Uniswap pool, but a few cents of full-range liquidity should be provided as a precautionary measure.

  1. Impermanent loss in the position is highly likely, but should be less of a concern

If impermanent loss is defined in the traditional sense (value of holding the initial allocation of assets less the value of the LP position), there will almost certainly be some amount of impermanent loss when utilizing a single-sided range. This is because in order to have a 50/50 ratio, you’re depending on the value of RDNT to outperform ETH. You accrue ETH in your position because traders are swapping their ETH for the RDNT in your liquidity position. When the value of RDNT rises against ETH, it is most likely the case that you would have been better off having held 100% RDNT versus holding a 50/50 ratio of RDNT/ETH + trading fees accrued. However, it is still possible that the price can oscillate while in range and accrue sufficient trading fees to offset that impermanent loss.

Despite suffering impermanent loss from the conversion of RDNT for WETH, for protocol-owned liquidity, the impermanent loss is more than offset from the savings in potential emissions and protocol fee revenues used to source liquidity from external providers.

Key Terms

  1. Protocol-owned Liquidity (POL) - Protocol-owned liquidity is liquidity that is owned by Radiant Capital

  2. Impermanent loss - Impermanent loss is defined traditionally as the difference in value between holding the assets and providing those assets as liquidity on an exchange. However, another definition of impermanent loss is based on the opportunity cost of the party providing liquidity. For example, if the party were not to provide that liquidity on an exchange, despite still being in need of liquidity, then the costs of sourcing that liquidity through other means should be subtracted from the value of holding the assets when comparing against the value of the liquidity position.

  3. Concentrated liquidity on Uniswap v3 - Concentrated liquidity means the liquidity position specifies a lower and upper range of liquidity

    • Unlike Uniswap v2, Sushi, and Balancer 80/20, the liquidity position will not provide liquidity over the entire price range of RDNT, but will specify a lower and upper range at which liquidity is provided
  4. Rebalance trigger - This indicates the percent distance that the price travels from the current price at time of rebalance to either the upper or lower range.

    • Example: Assume the current price is $1.00 and the liquidity range is between 50% ($0.50) to 200% ($2.00) of current price
    • A 10% rebalance trigger will trigger a rebalance when the price moves 10% of the distance to either the lower ($0.50) or upper ($2.00) range
    • Therefore, a rebalance will be triggered when the price hits either $0.95 or $1.10, at which points the liquidity ranges would again be rebalanced to 50% and 200% of the current price at time of rebalance.

Specifications

  1. Gamma’s position manager contract

    • hypervisor/Hypervisor.sol at master · GammaStrategies/hypervisor · GitHub
    • The depositor (Radiant DAO) deposits the base assets of the liquidity position into the contract, the contract mints ERC-20 tokens to the depositor, and the base assets are deployed directly to the Uniswap v3 liquidity position
    • Only the DAO’s address will be whitelisted to deposit/withdraw to and from the contract
  2. Security Considerations

    • Contracts have been audited by ConsenSys Diligence and Arbitrary Execution (https://docs.gamma.xyz/gamma/learn/audits)
    • The private, whitelisted contracts offer a high level of security because they would be immune from 3rd party flash loan exploits. No party other than the DAO, may deposit/withdraw to and from the contract.
    • The strategies are run via offchain automation bots for rebalances, and all rebalance and compound function calls are emitted as events on chain. The position is viewable onchain at any time. We will also provide the community with a tutorial to query the contract at any given time (See Appendix 2), and we can provide the engineering team with a Telegram bot that will allow them to view their position at any time with a simple bot command (i.e. /stats RDNT-ETH)
    • Gamma will only have management capabilities with rebalances and compounds as the main functions used by Gamma
    • The LP position is non-custodial in the sense that there is no ability for Gamma to withdraw or migrate any position of the liquidity; only the LP token holder will be able to withdraw from the position permissionlessly at any given time
  3. Preliminary strategy specifications

    • A single-sided range of RDNT will be deployed one tick above the current price to 100% of the current price
    • When a 50/50 ratio is achieved (precisely at sqrt(lowerRange * upperRange) ), the liquidity range will be rebalanced to 50% to 200% of current price, with rebalance triggers at 10%.
  4. Liquidity Amounts & Configuration -

    • Amount - $1M of single-sided RDNT
    • A single sided range that specifies a lower range at current price (0%) and upper range at 100% of current price will result in approximately 1% price impact on a 25 ETH (or $33.5K USD) trade for RDNT (See Appendix 1)
    • Upon reaching a 50/50 ratio, the position will rebalance to 50% and 200% of current price, which will result in approximately 2% price impact on a 25 ETH (or $33.5K USD) trade for RDNT (See Appendix 1)-

Steps to Implement

  1. The DAO will deposit RDNT into Gamma’s position manager contract, and will receive ERC-20 LP tokens in return
  2. The contract will deploy RDNT to a Uniswap position in accordance with the strategy specified above
  3. As soon as the position reaches a ratio of 50/50, Gamma will implement rebalance conditions that will more or less maintain a 50/50 ratio
  4. The position will automatically rebalance when the requisite price triggers are hit

Timeline

After due diligence has been conducted by the technical team, Gamma would need around 24 - 48 hours notice to deploy the contract and strategy.

Overall Cost

There are no upfront costs or management fees on the amount of liquidity provided. 14% of the swap fees earned from the position will be collected by Gamma as payment for its services upon compound and rebalance events. 86% of the swap fees will be reinvested at least once daily back into the liquidity position.

Competitor Analysis

Arrakis Finance

Arrakis Finance (formerly part of Gelato Network) also offers liquidity management services for protocol-owned liquidity. Its v1 contracts have garnered success mainly via its integration with MakerDAO, allowing for its USDC-DAI pair to be utilized as collateral to mint DAI. Its v1 contracts have been audited by Watchpug and Certik. Last December, it released its v2 contracts, which were audited by Watchpug and Statemind. Arrakis is offering its v2 contracts without automation. Its Arrakis PALM product, on the other hand, does offer automation services in tandem with its v2 contracts.

The main differences between Gamma and Arrakis are the strategies, business structure, and length of time in production .

In terms of the strategies, Arrakis v1 aims to set wide ranges in order to not rebalance. It has used Arrakis v1 on behalf of clients such as Lyra, Stargate, and MakerDAO. Arrakis PALM aims to manage multiple positions, ranges and fee tiers, and most recently both Arrakis and Gamma were appointed as liquidity managers for HOPR DAO.

Gamma’s v2 contracts utilize two positions and are automated to rebalance based on strategies tailored to the volatility and nature of each liquidity pair. To the public, it currently offers four types of automated strategies which one can view on http://app.gamma.xyz. For private clients, Gamma has managed automated single-sided strategies on behalf of ARCx and Bumper Finance, dual-sided strategies on behalf of Liquity, Angle, Ribbon, QuickSwap, and others.

Gamma’s dual-position, automated framework entails both a dual-sided position and an overlapping single-sided (limit) position. Upon rebalance, the new range will mandate a different allocation of assets. Gamma will maximize the amount of liquidity that is placed in the dual-sided range and place the remaining assets in a limit order position. The limit order range has performed better than swaps over time due to not incurring the swap fee and price impact on the swap. For new pairs, Gamma routinely back tests historical swap data to determine which combination of ranges and rebalance triggers would optimize for profitability, asset allocations, and/or price impact.

The business structure is quite different between Gamma and Arrakis. Arrakis charges a 1% management fee on the overall TVL and takes 50% of the swap fees as payment for its services. Gamma charges 14% of the swap fees as payment for its services and no management fee on TVL.

In terms of length of time in production, Arrakis v1 contracts have been in production for well over a year and Arrakis v2 contracts have been live since December 2022. Gamma v1 contracts and automation framework have been live in production since May 2021 and the Gamma v2 contracts, audited by ConsenSys Diligence & Arbitrary Execution, have been live for just over 10 months.

Other competitors

There are other v3 competitors in this space such as xToken, Popsicle Finance, and DeFi Edge. xToken offers similar products as Gamma’s public vaults which are open to the public, but have not offered its services for protocol owned liquidity. Popsicle Finance also offers LP range management services to the public, but they are aiming to go the route of specializing in JIT (Just in Time) liquidity. Other competitors such as DeFiEdge, Mellow Protocol, and Overnight.Fi are building structured type LP products, but are not in the protocol-owned liquidity management space.

Appendix 1 - Price Impact Calculator

  1. Red cells are manual inputs
  2. Cell C7 - Total USD value of the single-sided RDNT position
  3. Cell C12 - USD value of ETH
  4. Cell C18 - Width of the single-sided position
  5. Cell F16 - Simulated trade size amount in the single-sided position
  6. Cell F22 - Estimated price impact based on the simulated trade size amount
  7. Cell C27 - Total USD value of RDNT in the 50/50 position
  8. Cell C31 - Total USD value of ETH in the 50/50 position
  9. Cell C32 - USD value of ETH
  10. Cell C39 & C40 - Lower and Upper Ranges
  11. Cell F36 - Simulated trade size amount in the 50/50 position
  12. Cell F42 - Estimated price impact based on the simulated trade size amount
  13. Cell F95 - Simulated trade size amount in a hypothetical full-range position based on the liquidity amount in the 50/50 position
  14. Cell F106 - Estimated price impact based on the simulated trade size amount

Appendix 2 - Tutorial on Querying the Position Manager Contract For Ranges + Liquidity Amounts

  1. FWB Ranges & Position - Google Sheets
  2. Click the link located in Cell C1
  3. The link will direct you to Etherscan of a sample position manager contract for the FWB-ETH LP on Mainnet
  4. Read the contract information specified by Cells: C6, D6, E6, F6, and G6 and fill out their respective amounts in red in the cells directly below
  5. Cells C9, D9, E9, F9, and G9 will show the USD prices of the ranges being provided in
  6. To get the amounts of liquidity in each position, read the contract information specified by C13, D13, E13, and F13 and fill in the respective amounts in red in the cells directly below
  7. Cells C16, D16, E16, and F16 will show the amount of liquidity in each token
  8. In cell C18, fill in the current ETH price
1 Like

nice move

3 Likes

I think the gamma idea with single asset RDNT deposit is the way to go!

2 Likes

Gamma has a good recent track record. This seems like two questions. 1. Should the DAO use a managed liquidity provider? 2. If the answer is yes to the first question, then should that provider by Gamma Strategies.

Tbh I’m new to the RDNT LP protocol and Protocol Owned Liquidity as well. I’m not certain how significant a shift this is from Radiants original strategy but I will be reading through all of the docs asap.

2 Likes

I’m very happy to see the well exposed text and thoroughness of this proposal, it sets the standard for other protocols wishing to propose their ideas to the Radiant community.

I’m sure it will open a fruitful discussion in the next week regarding POL, looking forward to it!

3 Likes

I would say that in addition to the Motivations & Rationale section above, the Twitter Space that Gamma had with the Radiant community couple weeks back would be a good resource to help analyze and make this decision: https://twitter.com/RDNTCapital/status/1611059963610206211?s=20&t=sYwVq4UeRdHRcAmhsWqdsw

3 Likes

Sure, absolutely, Brian!

1 Like

I remember the Visor exploit which resulted in the “merger” with Gamma - rebranding from Visor to Gamma (the previous strategy arm) and replacing the token VISR with GAMMA.

If I recall correctly (please correct if wrong) this exploit was in the hypervisor architecture of Visor.

What steps have been taken to mitigate exploit risk lately?

2 Likes

Thanks for the response, and would be happy to answer your question! At this point, it’s a completely different project with different people, including myself, managing the day-to-day operations. But the most important thing is to outline the changes that we made to the original contracts and the audits that were conducted.

In terms of security, we’ve really gone the extra mile in terms of securing audits. Our latest contracts have undergone an intensive 4-week audit by ConsenSys Diligence and a 2-week audit by Arbitrary Execution (links are in the proposal). Although irrelevant to our current proposal, we’ve also had Mudit Gupta look over our staking contract (unrelated to the core contract), which was the main culprit behind the latest Visor exploit.

In terms of the core contract, the technical changes included implementing dual-sided deposits, TWAP checks, and re-entrancy safeguards at every corner of contracts. We’ve also released an article here detailing much of the changes (Gamma’s v2 Smart Contract Audit Completed by ConsenSys Diligence & Arbitrary Execution | by Gamma Strategies | Gamma Strategies | Medium). Ribbon Finance, FWB DAO, and Liquity have all used our new contracts for liquidity management.

Also, as mentioned in Specifications (2. Security Considerations), this would be for a private, whitelisted contract, which offers a great deal more security than our public-facing vaults given that it would be immune to 3rd party flashloan risk. Even so, our public-facing vaults have been live in production since March 2022 without issue.

Please let me know if you have any additional questions, and would be happy to clarify! Thank you.

2 Likes

In the case that the Uniswap v3 price goes out of range to the downside- who adds the nominal liquidity to move the price back to where the bulk of the liquidity is and what is the mechanism to notify someone that the nominal liquidity must be added?

2 Likes

The liquidity can be added right now. Just a tiny amount of full-range liquidity will ensure that the price can move back to where the bulk of the liquidity is. So there’s no need to notify anyone so long as a tiny amount of full range liquidity exists.

1 Like

This topic was automatically closed after 7 days. New replies are no longer allowed.

I am all for this in a v3. Let’s get v2 out the door, fully documented, and fully supported and functional first.

2 Likes

Hi @bp_gamma first of all thanks for setting the bar on proposal creation by a potential partner to Radiant. This is incredibly thorough and well thought out.

Based on the recommendation of others in the community, a few members of the Radiant team have also been in conversations with Arrakis regarding their new PALM product and bootstrapping POL in this manner.

It’s easy to see the benefit from a fee perspective here. So we’ll take this proposal into consideration, and perhaps there is a world in which both Arrakis and Gamma could both execute a liquidity bootstrapping strategy since it doesn’t seem to be mutually exclusive.

Prior to this going to vote, Radiant contributors will discuss this internally and follow up with the Gamma team on any clarification questions needed.

Again, awesome work!!

3 Likes

No problem at all! Happy to be a resource on liquidity management no matter which way the community ends up going.

Look forward to the vote, and please don’t hesitate to reach out if you have any other questions. Thank you!

1 Like

This topic was automatically closed after 13 days. New replies are no longer allowed.

Adding a placeholder here to discuss or reconcile how Gamma is addressing the potential frontrunning risk with various approaches described in the security section and in other conversations in the TG chat. Also, an update on the effort to integrate OpenZeppelin defender would be great!

1 Like