0.0.2 • Published 1 year ago

farms-cli v0.0.2

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

Farms

The aim of this program is to provide a generic Farm/Staking Pool

The logic is the following: 1. There is 1 global_admin which is used to manage flags that can enable/disable actions on the farm this will be expanded when new usecases are implemented 2. Farms are permissionless and each farm can have a different global_admin, so anyone can create their own farm 3. Each farm has one staking token but many staking rewards (the max number of reward tokens is defined in programs/farms/utils/consts.rs). 1 Staking token -> Many Reward Tokens 4. Each farm/pool has many users 5. A user can stake/unstake at any timne and their accumulated rewards can be harvested separately. There is also a min_claim_duration that can be set for each individual reward in order to enforce a minimum time you need to wait until you can claim. 6. The treasury vault is where fees can be accumulated. Initially there will be a 10% fee for any of the reward tokens, set in the global admin.

The staking logic is based on the current Hubble staking structure which is also based on the MasterChefV2 logic: https://github.com/1coinswap/core/blob/master/contracts/MasterChefV2.sol