Rewards Token Minter has in-built emission schedule, which mints itself along a
Reward tokens are claimed inside itself
Owner Functions
1) Set the global Emission Rate tokensPerBlock (set to 0 to turn off)
2) Whitelist LM Contract Vault Tokens (adds to array)
3) Set weights per LM Contract (for any vault)
examples
setVaultWeight(index, weight) onlyOwner
[1, 1, 1] sum is 3, so a vault is ⅓ = 33%
[2, 0, 1], sum is 3, first vault is ⅔, second vault is disabled, 3rd vault is ⅓
setting a weight to 0 effectively disables it
1) CHAOS Rewards ERC20 minter has a collectEmissions(pool) public anyone can mint the new allowed supply (to itself)
2) Users staked Pool Tokens in the Farming Contract
3) Users also call collectEmissions(pool) to get the entitled REWARDS PER POOL
Overview
1) Migration contract 2) Simple LM Contract 3) Farming Contract
Migration Contract
Move LP NFT from WEWE-WETH to WEWE-USDC on BASE.UNIv3
Collect Rewards (WEWE+WETH)
Sell WETH to USDC (user now has WEWE-USDC)
Deposit in LM Contract
LM Contract does the new Deposit as Owner
Refund the balance that can't be deposited in the band
LM Contract
Tokenised Membership
(ERC20 + ERC777)
Yield Collection
LM contract accrues the WEWE, USDC yields
anyone can call
collectFees()
, which sells WEWE fees to USDC and bring back to LM Contractlet this function be public for a bot to call, or anyone, and wrap this when someone collects their yield.
LM.claimFees()
is when a user gets their share of the USDC yieldLM.claimFees()
wrapsLM.collectFees()
which grabs the total Vault yieldSo this way someone collecting their USDC will collect the standby fees for everyone else (a perpetual loop)
claimFees()
needs to use MasterchefrewardDebt
function https://dev.to/heymarkkop/understanding-sushiswaps-masterchef-staking-rewards-1m6fFarming Contract && Token Minter (CHAOS)
Owner Functions 1) Set the global Emission Rate
tokensPerBlock
(set to 0 to turn off) 2) Whitelist LM Contract Vault Tokens (adds to array) 3) Set weights per LM Contract (for any vault)1) CHAOS Rewards ERC20 minter has a
collectEmissions(pool) public
anyone can mint the new allowed supply (to itself) 2) Users staked Pool Tokens in the Farming Contract 3) Users also callcollectEmissions(pool)
to get the entitled REWARDS PER POOL