How the Farming works

Covenants Farming

Ethereans love to farm. They do it all day and night—apes, penguins and wizards alike. But farming in DeFi is not always well-managed, and the hard-earned harvests of farmers are often at risk.
Covenants farming contracts allow us to farm safely and on our own terms. Anyone can host or participate in Farming setups that pool tokens across multiple AMMs at once.

The Basics

Covenants farming contracts have multi-AMM functionality and are designed to be used by anyone for a wide variety of purposes.
Hosting
Any DAO, DFO, individual wallet or customized smart contract can host a farming setup. You can even set it up to have no host at all. This flexible design makes it easy to set rules for distributing rewards (from a treasury or via minting) while preventing hosts from touching farmer tokens or manipulating rewards for positions, securing farmers from exploitation. Treasury
A core part of farming contracts is the treasury. It holds the reward tokens for all of the contract’s setups, and is programmed with the logic for how rewards will be distributed—i.e, via transfer or mint. Reward tokens must be sent to it before a setup can commence, securing farmers from any potential threats from poorly or maliciously coded custom extensions.
Rewards
All setups reward farmers with one token. It is the centrepiece of the setup, around which the rest of the contract is customized. This simplifies managing the customizable extension for each setup’s reward method (Mint or Transfer) and makes it easy to calculate the total amount of the token being inflated via rewards; all anyone has to do is call the setup(s) using it as a reward and they will be provided with the relevant data.
Setups
Farming setups can be either Free or Locked.
All setups can be customized to automatically renew immediately after they end. However, this does not automatically renew old positions; new ones must be opened manually.

Free Farming

Duration
Block-based fixed periods. Farmers can stake / un-stake liquidity anytime.
Position Availability
Any amount of farmers can participate anytime in a free farming setup.
Rewards
Availability
Provided by the host and locked in a treasury extension before the setup commences. This guarantees that farmers will receive their rewards securely and without having to trust that the host will send them.
Distribution
Block-to-block among active farmers pro rata to the % of total liquidity each provides.
Redemption
Rewards can be redeemed anytime with no penalty.
Hosting
Hosts can alter the rewards per block anytime, change the renew times and disable the setup at any time. These does not apply retroactively.

Locked Farming

Duration
Fixed block-based periods. Farmers can stake a position anytime after the period commences, but cannot unstake until it ends—at least not without incurring penalties (see below).
Position Availability
A position can be opened only if enough rewards are still available.
Rewards
Availability
Provided by the host and locked a treasury extension before the setup commences.
Distribution
Block-to-block from the treasury extension to farmers based on:
1. How much liquidity they stake.
2. How many blocks are left when the position is staked before the period ends.
Redemption
Redeemable as they become available from the block-to-block distribution. Must be returned if a farmer chooses to unstake their position prematurely.
Hosts
He can change the renew times and disable a setup anytime, but this does not affect previously opened positions whatsoever.

Farming Extensions

Covenant farming contracts are extendible. Extensions set the parameters for both basic and more advanced functionalities.
Hosting
This extension establishes a secure treasury for a setup’s reward token, and is programmed with the logic for how the token—i.e, via transfer or mint—will be distributed.
Rewards
Hosts can alter the rewards distributed per block for active Free setups and disable both Free and Locked setups anytime. Such alterations are implemented with the next block, but do not apply retroactively; no previously earned rewards are affected, nor are Locked positions in any respect. Any rewards not yet issued or no longer required are automatically returned to the contract’s treasury.
Hosts
Any dApp, DAO, DFO, individual wallet or customized smart contract can be a host. Setups can even have no host at all, in which case its rules are immutable.