Liquid Farming Module Concepts
A
liquidFarm
corresponds to one unique pool id. A liquidFarm
stakes and unstakes the pool coins as users’ requests. When the rewards are allocated by staking the pool coins, the liquidFarm
creates and manages an auction in order to exchange the rewards to pool coins to be staked additionally.A
liquidFarm
can be registered to the parameter liquidFarms
by governance for activating the liquid farming of a pool. When the liquidFarm
is registered to the parameter, users can request to farm their pool coins.A
liquidFarm
can be removed in the parameter liquidFarms
by governance for deactivating the liquid farming of a pool. When the liquidFarm
is removed, the module unstakes all pool coins in the module, users cannot request to farm their pool coins, but users can still request to unfarm LF coins. In this case, the ongoing rewards auction becomes finished, all bids are refunded, and a new auction is not started.Once a user farms their pool coin, the user receives LFCoin instantly minted. The following formula is used for an exchange rate of
LFCoinMint
when a user farms with LPCoinFarm
.
where
LFCoinSupply
is not zero. If LF Coin Supply
is zero, then the following formula is applied:
When a user unfarms their LFCoin, the module burns the LFCoin and releases the corresponding amount of pool coin. The following formula is used for an exchange rate of
LFCoinBurn
to receive LPCoinUnfarm
:
if
, where
CompoundingRewards
is the amount of pool coins obtained from the last rewards auction. If , the following formula is used:
If the
liquidfarm
is not registered in the governance parameter, the LiquidFarming
module unstakes all LP coin, and the following formula is used an exchange rate of LFCoinBurn
:
On behalf of users, the module stakes their pool coins and claims farming rewards. In order to exchange the rewards coin(s) into the pool coin to be additionally staked for farming, the module creates an auction to sell the rewards that will be received at the end of the auction period. Note that the exact amount of the rewards being auctioned is not determined when the auction is created, but will be determined when the auction ends. The amount of the rewards depends on the total amount of staked pool coins and the
liquidfarming
module’s staked pool coin, which can be varied during the auction period. Therefore, a bidder to place a bid for the auction should be aware of this uncertainty of the rewards amount.The
liquidfarming
module collects fee from the received rewards when the auction is finished before giving the rewards to the winner. Liquidfarmers need to be aware of the potential reduction of the effective rewards. If there is only one bidder who places a bid with very low bidding amount compared to the received rewards, then the effective APR can be reduced. The liquidfarming
module expects that the multiple bidders compete each other and the liquidfarm
can get the proper rewards via auction process.A bidder can place a bid with the pool coin, which is the paying coin of the auction. A bidder only can place a single bid per auction of a liquid farm. The bid amount of the pool coin must be higher than the current winning bid amount that is the highest bid amount of the auction at the moment. The bidder placing the bid with the highest amount of the pool coin becomes the winner of the auction and will takes all the accumulated rewards amount at the end of the auction.
Last modified 5mo ago