Creating a Farm
How to create a farm (incentive) for an Alcor Swap pool.
A farm pays a reward token to the staked positions of one pool over a fixed duration. The pool must already exist.
Who can create a farm
- The issuer of either token of the pool (the account that issued the token in its token contract) creates farms for free.
- Anyone else must first pay a farm creation fee. The fee is set per chain in the
incentivefeetable ofswap.alcorand can change, so check it before you pay.
Any token can be used as a reward.
Using the farm creation page
The farm creation page is on the classic interface of each chain: wax.alcor.exchange/farm/create (or proton., eos., telos.alcor.exchange). It is meant for token issuers.
- Connect the issuer account.
- Select the base and quote token of the pool, then its fee tier.
- Add one or more rewards: the reward token and the total amount to distribute.
- Select the duration: 1, 7, 30, 60, 90, 180, 240 or 360 days. The page shows the resulting daily reward.
- Click Create Farm and sign the transaction.
Creating a farm directly with the contract
All actions go to swap.alcor and can be sent in one transaction:
- Creation fee (not needed for token issuers): transfer exactly the amount in the
incentivefeetable toswap.alcorwith the memoactiveincent. The prepaid fee is used by your next farm. - Create the farm: call
newincentivewith:creator: your account;poolId: the pool to reward;rewardToken: the reward token as an extended asset with a zero amount, for example{"quantity": "0.0000 TLM", "contract": "alien.worlds"};duration: in seconds, one of86400,604800,2592000,5184000,7776000,15552000,20736000,31104000(1 to 360 days).
- Fund the farm: transfer the reward tokens to
swap.alcorwith the memoincentreward#<incentiveId>. The farm starts distributing when it receives rewards.
Adding rewards later
Only the farm's creator can add rewards, with another incentreward#<incentiveId> transfer. The new amount and whatever was still undistributed are spread over a fresh full duration starting from that moment.
Questions: Alcor Telegram.