weweswap / contracts

smart contracts
MIT License
1 stars 4 forks source link

ADD: WEWESwap Migration V1 #25

Closed jpthor closed 2 weeks ago

jpthor commented 1 month ago

Overview

1) Migration contract 2) Simple LM Contract 3) Farming Contract

Migration Contract

LM Contract

Tokenised Membership

(ERC20 + ERC777)

Yield Collection

Farming Contract && Token Minter (CHAOS)

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