- Incentive: A reward farm. Multiple farms can be permissionlessly created for a liquidity pool. One can optionally create boosted farms, where the staker's voting power in a particular locker can give additional fees. Boosting is based on the Izumi finance boost formula.
min((vliquidity∗40/100)+(Totalvliquidity∗VotingPower/VotingTotal∗(100−40)/100),vliquidity)
-
Deposit: A Cykura LP NFT deposited into the smart contract. A deposit can be staked into one or more incentive to earn rewards.
-
Stake: The state of a deposit staked into an incentive.
-
Reward: Tracks rewards owed per address.
-
Farm creation:
createIncentive()
orcreateIncentiveBoosted()
. Any valid Tribeca locker can be used for boosting. In our case, provide the address for Cykura's official locker.
-
Stake token:
- Deposit the LP NFT using
createDeposit()
, then stake the deposit in an incentive by callingstakeToken()
. - Shortcut: use
depositAndStake()
to call both functions in a single TX - Note: Dual liquidity mining rewards need two stake instructions.
- Deposit the LP NFT using
-
Collecting fees and withdrawing
- Create a
Reward
account usingcreateRewardAccount()
unstakeToken()
andunstakeTokenBoosted()
remove the deposit from a staked incentive. Note that reclaiming the LP NFT or collecting the reward tokens need additional steps.- To reclaim the deposited NFT, call
withdrawToken()
- To collect reward, call
claimReward()
. This can be done independently ofwithdrawToken()
. - If you only want to harvest fees and keep the token staked, call
stakeToken()
instead ofwithdrawToken()
.
- Create a
- Every wrapper (Incentive, Reward, Stake and Deposit) has a
data()
function to fetch and cache accounts. - Unclaimed reward- stake.getRewardInfo()
- APR- TODO
- Boost percentage- TODO
- Find all deposits of a user-
deposits.fetchAll()
, then filter for the wallet's address - If a deposit is staked in an incentive- Generate the stake address using the deposit and incentive addresses.