Creating a Farm

With permissionless Farm creation, anyone can reward their community through token emissions by setting up their own Farm on Aftermath. Simply follow these easy steps to get started:

First, you will need to have a Liquidity Pool on Aftermath for which you would like to create a farm. If you have not yet set a Pool up, follow the instructions in Creating a Pool. If you want to create a Farm for a token, not a Pool, you can skip this step.

Once your pool is set up, navigate to the Farms page. At the top right of the screen, above the list of all of the active Farms, you will see a + Create Farm button. Click here to begin.

The first step is to specify the Stake Coin Type for the pool. This is the coin users will stake into the Farm, typically it is the LP token for the pool you have created. You can copy the coin type from your wallet, which you can access from the menu bar at the top of the screen. Simply scroll down to Unrecognized Coins, and click the clipboard icon next to the address below the LP coin you wish to create a Farm for, then paste the address into the Stake Coin Type field.

Once you have pasted the coin address, the Stake Coin will display at the bottom of the screen and you can confirm it is the correct one.

There are a few parameters to specify values for prior to creating your Farm:

Minimum Stake Amount: The smallest amount of coins a user can stake into your Farm. We suggest setting this to 1, though you may choose a different value if it better suits your LP token.

Maximum Lock Multiplier (1-18): You have the option to provide a higher rewards emission rate for LPs who lock their tokens in the Farm for a specific duration. This is to reward users who commit to providing liquidity to your Pool for a longer term, but is optional. If you do not want the option to lock Farming positions, set this value to 1.

If you would like the option to lock for a higher rewards rate, decide on the magnitude of the multiplier you would like. The value you enter is the multiplier the user will recieve if they lock for the longest possible time you allow.

For example, if you set the Maximum Lock Multiplier to 2, and the Maximum Lock Duration to 1 Month, a user who locks for 1 month will receive rewards at twice the rate a user who does not lock at all will. A user who locks for 2 weeks will receive rewards at 1.5x the rate as a user who does not lock at all. The emissions rate scales linearly from no lock to maximum lock.

Minimum Lock Duration: The shortest amount of time users can Lock for. We recommend setting this to 0 months 0 days, as this makes Locking optional to users. If you want every user who deposits into the Farm to have to Lock for some duration, you can specify that minumum duration here.

Maximum Lock Duration: The longest period of time a user can lock for. Locking for this duration will provide the Maximum Lock Multiplier and result in the greatest possible rewards emissions rate. If you do not want to have the option to Lock at all, set these fields to 0.

Once you have specified each parameter to your liking, you can click Create Farm to deploy your Farm.

Now that your Farm has been created, you can access it from the Farms page on Aftermath. Select the Community tab on the Farms page, and you will see your newly created Farm listed. Click on it and you will see two tabs at the top of the page, the User View and the Admin Settings. Select Admin Settings to manage your Farm. Note that you must be connected to Aftermath with the Sui address which created the Farm to acess Admin Settings, though the Admin Cap can also be shared which we will cover later.

Reward Initial Deposit: In order for your Farm to begin emitting rewards, you must first Initialize Rewards. Here you will specify the coin you wish the Farm to emit as rewards, for example SUI or your project's own token. Using the Select Coin dropdown menu, choose the coin you wish to emit. Note that your farm can emit more than one token by simply initializing them one at a time.

Emission Frequency (Ms): Once you have specified the reward coin, you must specify the Emission Frequency for the Farm. The value you enter here is the amount of the reward token the Farm will emit each millisecond, which is shared amongst all users staked into the Farm according to the size of their stake and their lock multiplier. The amount is split pro rata between all stakers. If there are two stakers, one who max locked for a 2x multiplier and one who didn't lock, then the max locker would receive 2x more of the emitted tokens.

To determine what your Emission Frequency ought to be, you must consider how much liquidity you expect to be staked into the Farm, and what your desired APR is. Note that it is possible to increase the emissions rate, but not to decrease it. If you are unsure, you can always increase the rate if the APR is lower than you would like it to be. If you have questions about this particular step, reach out to us in Discord and a team memeber can assist you.

Start Emissions In (Ms): This provides you the option to delay the start of Emissions by some duration of time. This is useful if you want to set the Farm up first prior to announcing it on your socials, and prevents people from discovering it before you would like them to be able to earn rewards.

Once you are satisfied with your parameters, click Initialize Rewards. Next, click on the Deposit Rewards tab to add your reward coins to the vault.

You can now deposit the reward coin or coins into your Farm. You will see each coin you have initialized listed; if you would like to add another coin simply follow the previous steps to initialize another reward coin.

To determine the amount of reward coins to deposit into your Farm, consider your Emissions Rate and the length of time you would like the Farm to run for before you will need to deposit more rewards.

Once you have decided upon an amount to deposit, click Deposit Rewards to add the coins to the Vault.

As the Total Value Locked in your Farm increases, the APR each user receives will decrease. In order to continue to incentivize the growth of your Pool, you may wish to increase your emissions rate. To do so, simply navigate to the Increase Emissions tab, and enter the new emissions rate you would like to set for your Farm. Note that it is not possible to decrease emissions.

Finally, it is possible to share the Admin Cap with another Sui address to allow someone else to access the admin settings of your vault. This grants a OneTimeAdminCap to another address to give them-one-use only capability objects to perform a permissioned function (e.g. add rewards or change emissions). This is useful for granting access to other teammates, or for partnerships where another team may want to sponsor your Farm with their own token. Simply paste the Sui address of the person with whom you would like to share admin access to your Farm, and click Grant Admin Cap to allow access.

And that's it! We are happy to help with any of these steps so if you have any questions, please feel free to reach out to us in Discord.

Last updated