Candy: a single sided liquidity mining and farming protocol
Rented liquidity has one important benefit for the protocols: it increases the liquidity of the token which makes it easier for the token holders to buy and sell protocol tokens. More liquidity - less slippage. With the era of AMM DEXes started, most of the liquidity mining tools were designed to allow users to hold both tokens in the pool and take impermanent loss as a risk for such activity. These actions are rewarded by fees shared across LPs and also often by extra incentives from the farming tokens distribution.
In this article we’ll describe a new protocol for the liquidity mining and farming by the users without need to provide both tokens into the DEX pools. Such protocols are named as “single sided”, because liquidity provision comes from single token only.
The risk of impermanent loss replaced by the risk of “blending” originally deposited assets with the fraction of the assets issued by the protocol. Same approach works well with the protocols like curve where users are able to provide single sided liquidity, but they are exchanging back the mixture of stablecoins in the proportion determined by the assets balance in the pool. This approach works for stablecoins or “same pegged” assets AMMs, but we’ll explain how to use the same principles for the PMM pools where one asset (quote asset) minting is controlled by the protocols or DAO.
$candyETH - ERC20 vault token owned by the user for the locked ETH (or token pair pegged to ETH $ value) into the candy protocol.
$GCD - stablecoin mintable from the DAO treasury
PMM - Proactive Market Maker DEX pool
lpETH - locked ETH in the PMM, owned by protocol (POL).
lpGCD - locked stablecoin in the PMM
blend - (ETH, GCD) tokens pair the dollar $ value is equal to the $ETH value into $candyETH, the proportion of ETH and GCD tokens depends on the PMM liquidity balance.
For example: if #lpETH = #candyETH Alice exchanging 10 candyETH back for 10 ETH without mixture of GCD. If pool has only 8 lpETH and total issued candyETH is 10, so we have 0.2 or Alice will receive a blend with 8 ETH and 200 GCD, so the total $ value will be 10 ETH.
Case 1: Equilibrium
In that case we have #candyETH is equal to #lpETH. This case is already explained above. Alice always receives 10 ETH back for 10 candyETH.
Case 2: Base Dominance
In that case we have #candyETH is less than #lpETH. Here the fraction is also 0. Alice always receives 10 ETH back for 10 candyETH. The corner case is #candyETH = 0, so the pool has only lpETH and equal $ amount of GCD.
Case 3: Quote Dominance
In that case we have #candyETH is more than #lpETH. Here the fraction is not 0. Alice receives blend where fraction of GCD depends on 1 - #lpETH / #candyETH ratio. The corner case is #lpETH = 0, so Alice receives 10 ETH $ value in GCD stablecoin.
As soon as locked tokens (ETH as an example) are used into the PMM pools to accelerate trading activity and push rented liquidity for the DAO owned stablecoin GCD utility. This user action and risks (to receive fraction > 0) must be compensated by rewards coming from the DAO. There are several types of rewards possible:
* staking of the $candyETH tokens with fixed APR comes from gov token emission or stablecoin emission. This process is called liquidity Farming.
* PMM DEX trading fees profit share between $candyETH stakers.
An architecture of PMM based on 2 asymmetric bonding curves and asymmetric liquidity allows us to easily maintain the TVL($) in the pool. In the equilibrium case we can see that the PMM pool contains ¼ of ETH and ¾ of GCD.
So in current design we need to have 3X GCD stable tokens to deposit into the PMM pool to maintain the proportions for every X liquid assets deposited into protocol. At first glance this might seem that GCD is undercollaterized and this might affect it’s liquidity, but at the same time these 3X tokens don’t hit the market per se - they are in the liquidity pool and can only be obtained for further exchanges only through depositing some extra liquid assets into the PMM pool we created. So although the total GCD mint number is high - it can only hit the market if people exchange it for liquid asset, thus we have in a sense full collaterization here. We can extract these deposited liquid assets & use them to buy back GCD so the tokens are always backed.
What I don’t see in the scheme is the exact logics for GCD minting - if the main source of this algo stable - is minting through the bonding contract then we can’t straight away get the liquidity deposited to Candy into the PMM pool - the protocol would need to issue a bond for the deposited amount but it’s vesting is spread over time and we don’t get GCD straight away. If we need instant liquidity provision - we need to give the protocol the ability to mint the amount of GCD necessary for PMM pool deposit, or have pre-minted reserves to make the process seamless - say in one transaction the user buys candyETH, stakes them - we get the liquidity, mint or get pre-minted GCD from the treasury, and deposit liquidity to PMM pool.
Since, as described in the first paragraph - the surplus GCD doesn’t really hit the market and can only be bought with the liquid assets - maybe giving the Candy contracts the ability to mint GCD is better option - we don’t rely on manual treasury management here, the core team doesn’t get access to the minted GCD so there is no risk of a rug pull here, everything is algorithmic.
Something similar, yes, but looking at the “Accountability” part and what follows “These audits do not cover” sentence - our system is much more transparent since minting contracts & permissions would be open for any scrutiny
In the equilibrium case we can see that the PMM pool contains ¼ of ETH and ¾ of GCD.
How were these rates determined? Are there any arguments for this ratio?
So in current design we need to have 3X GCD stable tokens to deposit into the PMM pool to maintain the proportions for every X liquid assets deposited into protocol.
How does the protocol handle situations where no liquidity from the treasury is available to mint GCDrequired to pair with deposited candy assets? Especially at the initial growth stages, I can imagine deposited funds to grow exponentially.
Minting should always be backed with other funds to collateralize the GCDasset. If the treasury is not big enough, it would stifle growth.
… At first glance this might seem that GCD is undercollaterized and this might affect it’s liquidity, but at the same time these 3X tokens don’t hit the market per se - they are in the liquidity pool and can only be obtained for further exchanges only through depositing some extra liquid assets into the PMM pool we created…
Not per se. GCD can also be obtained when ETH is retrieved and lpETH < candyETH (first example given). Is the protocol sufficiently protected against situations where funds are withdrawn en masse? Can the protocol guarantee GCD to stay pegged at 1$ in these situations?
I understand this part a bit different. For me, the 3x GCD are a necessity following the other fomulas:
We have a share of the TVL (in the whole system, not only the pool, as far as i understand) of lpETH$ (currently in the pool) and candyETH$ (currently “in the wild”, belonging to users of the system). Therefore, we also have to have a corresponding amount of GCD in the system, which backs exactly the the ETH (together lpETH and candyETH) in lpGCD in the pool. Therefore, the TVL$ is the ETH share + the GCD share (of the same size). Hence we have a formula for the TVL$ as:
TVL$ = 2 * (lpETH$ + candyETH$)
Therefore, in order to always have enough liquidity in GCD in the whole system, the pool has to have enough liquidity to cover the whole TVL$. Hence the pool currently already has lpETH$, we can deduct that from the necessary liquidity in GCD in the pool (lpGCD$) and come to the equation:
Alice puts lpETH$ in the pool and receives the same amount of candyETH$. Therefore, at this point, the system has lpETH$ + candyETH$ TVL. This needs to be matched by the exact amount of lpGCD$, hence the total TVL in the system needs to be 2 * (lpETH$ + candyETH$).
There are no protocols with such protection in DeFi. We can say that this protocol is increasing slippage for those who is selling ETH if there is massive sell at short time.
Btw, to sell the asset A you have to somehow get it buy or farm. If dao is selling we are increasing liquidity for exit, if there is staking/farming rewards - so with sustainable 23% it’s not possible at all.
please nocice that PMM locked $GCD isn’t minted actually. It’s not circulating in the market, but holding by DAO.
The only way how it’s can be counted as circulating (and must be backed by $gton) is if it’s releasing from PMM DEX by purchasing by someone. And purchasing is actually increasing backing of the $GCD itself on PMMs.