🍬
CANDY
A single-sided liquidity mining and farming protocol

Intro

With the advent of AMM DEXes, most liquidity mining tools allow for holding a pair of tokens in a pool, where impermanent loss becomes the primary risk for engaging in liquidity provision. Engaging in risky activity required from a liquidity provider is rewarded by fees shared across LPs and sometimes by extra incentives formed from the distribution of farming tokens.
A crucial law of AMMs is the more liquidity is present in a pool, the easier it is for token holders to buy and sell. In cases where protocol-owned liquidity is insufficient, assets can be rented from users in order to boost the liquidity available in pools, which can be an efficient tool to support short-term trading. By borrowing the liquidity, protocols can reduce slippage on exchanges, thereby making their tokens more marketable.
In this article, we will describe Candy, a new protocol for liquidity mining and farming which does not require putting a pair of tokens into DEX pools. Such protocols are usually called “single sided” because liquidity provision is done with only one token.
In Candy, the risk of impermanent loss is replaced by the risk of withdrawing a “blend” of originally deposited assets with a fraction of assets issued by the protocol. A similar approach is implemented in different protocols where users also provide single sided liquidity, such as Curve. The withdrawal process in such protocols yields a mixture of stablecoins in the proportion determined by the asset balance in the pool. This approach can work for stablecoins or assets with the same peg on AMMs. Candy applies similar principles to PMM pools, with the quote asset minting being controlled by the protocol or a DAO.

Definitions

candyETHcandyETH
- an ERC20 vault token which the user receives in exchange for locking ETH (or a token pair pegged to ETH dollar value) in Candy protocol
GCDGCD
- stablecoin mintable from DAO treasury
PMM - Proactive Market Maker DEX pool
lpETHlpETH
- ETH locked in the PMM pool, owned by the protocol (POL)
lpGCDlpGCD
- stablecoin locked in the PMM pool
blendblend
-
ETH/GCDETH/GCD
tokens pair; its dollar value is equal to $ETH value being put in Candy to get
, and the proportion of ETH and GCD depends on the PMM liquidity balance
fractionfraction
- the $ share of GCD in a blend
- means the dollar value of asset X

Algorithm

  1. 1.
    Alice deposits 10 ETH and receives 10
    candyETHcandyETH
    . ETH price is $100, so the total $ value deposited by Alice is $1000;
  2. 2.
    Alice’s 10 ETH are paired with
    GCDGCD
    minted from DAO treasury and put into the PMM pool, which yields lpETH and lpGCD;
  3. 3.
    The TVL in dollars is always equal to:
    In this case,
    = $4000 and
    = $3000
  4. 4.
    To redeem her locked funds, Alice burns 10 candyETH to exchange it back for an
    ETH/GCD ETH/GCD
    blend of 10
    ETH ETH
    dollar value. The proportion (fraction) is determined by the formula:
    Fraction(GCD)=max(1(lpETHcandyETH),0)Fraction(GCD)=max(1-(\frac{lpETH}{candyETH}),0)
For example, if
lpETH=candyETH lpETH = candyETH
, Alice can exchange 10
candyETH candyETH
back for 10 ETH without any
GCD GCD
. If the pool has only 8
lpETH lpETH
and the total issued
candyETH candyETH
is 10, the proportion is 0.2, therefore Alice will receive a blend of 8
ETH ETH
and 200
GCD GCD
, so that the total dollar value remains equal to 10
ETH ETH
.

Liquidity

Case 1: Equilibrium

In this case,
lpETH lpETH
is equal to
candyETH candyETH
. This case is explained above, where Alice receives 10
ETH ETH
back for 10
candyETH candyETH
.

Case 2: Base Dominance

In this case, there is more
lpETH lpETH
than
candyETH candyETH
. The fraction is therefore equal to 0. Similar to the above case, Alice will receive 10
ETH ETH
back for 10
candyETH candyETH
. The corner case is
candyETH=0 candyETH=0
, where the pool has some left
lpETH lpETH
and the equal $ amount of
GCDGCD
.

Case 3: Quote Dominance

In this case, there is less
lpETHlpETH
than
candyETHcandyETH
. Alice receives a blend where the proportion of GCD depends on the
1(lpETH/candyETH)1-(lpETH/candyETH)
ratio. The corner case is
lpETH=0lpETH = 0
, where Alice receives 10
ETHETH
$ value in
GCDGCD
stablecoin.

Incentives

The locked tokens (e.g. ETH), which serve as rented liquidity for the DAO, are used directly in PMM pools to support trading activity and boost the utility of DAO’s own stablecoin. The activity of liquidity providers and the risks they encounter (when fraction > 0) must be compensated by rewards coming from the DAO. There are several types of rewards possible:
  • staking of candyETH tokens with a fixed APR, which comes either from governance token emission or stablecoin emission. This process is called liquidity farming.
  • PMM DEX trading fees distributed between candyETH stakers.

PMM

The PMM architecture based on asymmetric bonding curves that allows for asymmetric liquidity can easily support a high
in the pool. In the equilibrium case, the PMM pool will contain ¼ of ETH and ¾ of GCD.