Farms
A farm accepts one supported staking asset and assigns it a share of the base WEED reward flow.
#What is a farm?
Each farm is a pool in WeedChef. The pool records its staking token, reward weight, deposit fee, harvest interval, optional rewarder, and active state. A token address cannot be registered twice.
#Supported position types
Configured farms can accept a fungible WeedSwap vault share or a standard ERC-20 staking token. Direct Uniswap v3 NFTs follow the separate v3 staker flow and are not deposited into the ERC-20 WeedChef pool as an NFT.
#Optional Rewarders
Changing, attaching, or removing a Rewarder after credited stake exists does not migrate user stake between Rewarder ledgers. The old Rewarder can keep stale balances, while a replacement starts without the pool's existing users and can misdirect auxiliary rewards.
The Rewarder constructor calculates rewardRate from a declared fundedAmount but does not transfer tokens or verify its balance. Underfunding can make claims revert, while time without recorded stake, integer remainder, or excess funding can strand reward tokens because no recovery path exists.
#How rewards accrue
The emission controller integrates WEED per second, bounded by the base farming reserve. Pools with credited stake split that flow by allocation points, even if a pool has later been closed to new deposits. Within a pool, each account earns according to its credited share of total staked principal and time in the pool.
#Harvest lockup
A harvest interval limits how often an account can receive accrued WEED. Rewards continue to be accounted while the timer is closed and move into locked rewards until a settlement occurs after the next harvest time.
#Deposit fees
A farm may charge a bounded fee on the staking tokens actually received. The credited stake equals received principal minus that fee. The exact value must be displayed before a future signature.
#Earned and harvestable
Earned means the total base reward currently accounted by the pool view, including locked rewards. Harvestable means the timer is open and a settlement can transfer rewards. A positive earned value can therefore exist while harvesting is still locked.
#How to enter a farm
- Connect your wallet.
- Add liquidity to a supported pair or obtain the required staking token.
- Receive a supported position or vault share.
- Approve the verified farm contract for the intended amount.
- Deposit the position after reviewing the fee and credited amount.
- Harvest WEED after the configured timer opens.
#How to harvest
Update the farm view, check the next harvest time, and submit Harvest to the verified pool. A successful base reward settlement then calls the referral hook separately. A referral hook failure does not erase the base entitlement.
#How to withdraw
Withdraw reduces credited principal and returns the supported staking token. The contract settles accounting in the same flow, but principal access is not conditioned on the guardian keeping rewards active.
#Emergency withdrawal
Emergency Withdraw returns credited staking principal and clears the user record without updating or settling farm rewards. It forfeits stored locked rewards and any unsettled pending base rewards accrued since the last settlement, so it is an exit path rather than a normal harvest shortcut.
The emergency path reduces the pool's total credited stake before any pool checkpoint. The next update can divide the full elapsed pool reward by the smaller stake balance and over-credit remaining users. If the exit empties the pool, it can also change the active allocation denominator before the global checkpoint and redistribute historical pool allocation.
The path also does not reset optional Rewarder stake. These accounting defects block farm deployment even though the principal-return path must remain available during pauses.
#Risks
Farm users face staking-token price risk, smart-contract risk, approval risk, and the risks of the position that produces the staking asset. Vault shares add custody and concentrated-liquidity exposure. Rewards and token prices are never guaranteed.
