What you can do
| find-farm | Pick a farm for a token pair or LP | GET https://api.vfat.io/v4/farms?chainId=<id>, keep isDepositSupported true and isKilled false, then match pool.underlying tokens and extraAprs. |
| deposit-lp | Deposit LP tokens into a farm | approve factory.predict(you) for the LP token, then the chain's FarmStrategy.deposit((lpToken, amountIn, stakingContractAddress, extraData), approved, referralCode). Your Sickle is deployed on the first call. |
| deposit-nft | Deposit a liquidity position NFT into a farm | approve factory.predict(you) for the NFT (or setApprovalForAll), then NftFarmStrategy.depositErc721(nftContract, tokenId, stakingContract, extraData, approved, referralCode). |
| harvest | Claim farm rewards | FarmStrategy.harvest((tokensOut, stakingContractAddress, extraData)). Rewards are sent back to the caller. |
| withdraw | Withdraw LP from a farm | FarmStrategy.withdraw((lpToken, amountOut, stakingContractAddress, extraData)), or exit(...) to harvest and withdraw in one call. |
| check-position | Find your Sickle and read its position | factory.sickles(you) returns your Sickle (zero if none). Positions are then read from the farm contract that holds the LP for that Sickle (protocol specific). |
Each Sickle is a smart wallet that holds your LP tokens and NFTs. The owner can act through it, and the approved address can run automation on it. Set approved to zero or to an address you trust.
Strategies call the Sickle through delegatecall into whitelisted modules, and vfat admins can change the whitelist (SickleRegistry.setWhitelistedTargets and setWhitelistedCallers). The set of contracts a Sickle can call can change over time.
Fees are set per action in SickleRegistry (capped at 5 percent, MAX_FEE 500 bp) and charged through FeesLib when a zap or swap is used.
Farm and LP risks apply: impermanent loss on LP positions, reward token price moves, and the risks of the underlying DEX or lending protocol. The farm list flags depositable and killed farms, but it does not vouch for their safety.
Contracts
Read any function, or build a write and sign it. Amounts are in base units (1 USDC = 1000000).SickleFactory (ethereum)factory on ethereum0x9D70B9E5ac2862C405D64A0193b4A4757Aab7F95
write deploy(address,bytes32)
Create your own Sickle wallet (create2, salt = your address). Arguments: approved (address allowed to run automation, zero address for none) and referralCode (bytes32, zero for none). Reverts if you already have a Sickle or isActive() is false. The strategies also deploy one for you on your first deposit.
write getOrDeploy(address,address,bytes32)
Returns the owner's Sickle or deploys it. Only whitelisted callers (the strategy contracts) can call it, so users do not call this directly.
read predict(address)
Address the Sickle of an owner will have, before it is deployed. Approve this address for LP tokens or position NFTs before the first deposit.
read sickles(address)
Sickle wallet of an owner. Zero address if the owner has none yet.
read admins(address)
Owner of a Sickle wallet, given the Sickle address.
read referralCodes(address)
Referral code stored for a Sickle wallet (zero if none).
read isActive()
False when the factory has been paused, so deploy and getOrDeploy revert.
read implementation()
The Sickle implementation that every wallet is a clone of.
read registry()
SickleRegistry with the caller whitelist, target whitelist, referral codes and fee settings.
FarmStrategy, LP tokens (ethereum)strategy on ethereum0xa6002cE302caDF7f6658b35eaCdb1Ab408636430
write deposit((address,uint256,address,bytes),address,bytes32)
Deposit LP tokens into a farm. First argument (params): lpToken, amountIn (token smallest unit), stakingContractAddress (the farm or MasterChef-style contract), extraData (protocol-specific bytes). Second: approved address for automation (zero for none). Third: referralCode (zero for none). Approve the caller's predicted Sickle for lpToken first, because tokens are pulled from the owner into the Sickle. Payable for native-token deposits.
write withdraw((address,uint256,address,bytes))
Withdraw LP tokens from a farm the caller has a position in. Argument (params): lpToken, amountOut (LP amount to withdraw), stakingContractAddress, extraData. Acts on the caller's own Sickle.
write harvest((address[],address,bytes))
Claim farm rewards to the caller. Argument (params): tokensOut (reward tokens to send back to the owner), stakingContractAddress, extraData. No approval needed.
write exit((address[],address,bytes),(address,uint256,address,bytes))
Harvest and withdraw in one call. First argument: harvest params (tokensOut, stakingContractAddress, extraData). Second argument: withdraw params (lpToken, amountOut, stakingContractAddress, extraData).
read getSickle(address)
Sickle wallet for an owner. Reverts if the owner has none.
read factory()
SickleFactory this strategy uses. Check it matches the factory for the chain before trusting the strategy.
read connectorRegistry()
ConnectorRegistry that maps farms to protocol connectors.
NftFarmStrategy, position NFTs (ethereum)strategy on ethereum0xd6B71D2DBdafD0F87E6E91bcC5DbF023424f5A5b
write depositErc721(address,uint256,address,bytes,address,bytes32)
Deposit an ERC721 liquidity position NFT into a farm. Arguments: nftContractAddress, tokenId, stakingContractAddress, extraData, approved (automation address, zero for none), referralCode (zero for none). Approve the caller's predicted Sickle for the NFT first (approve or setApprovalForAll), because the NFT is moved from the owner into the Sickle.
write withdrawErc721(address,uint256,address,bytes,address[])
Withdraw a farmed position NFT back to the owner. Arguments: nftContractAddress, tokenId, stakingContractAddress, extraData, rewardTokens (reward tokens to sweep back to the owner).
read getSickle(address)
Sickle wallet for an owner. Reverts if the owner has none.
read factory()
SickleFactory this strategy uses.
SickleFactory (base)factory on base0x71D234A3e1dfC161cc1d081E6496e76627baAc31
write deploy(address,bytes32)
Create your own Sickle wallet (create2, salt = your address). Arguments: approved (address allowed to run automation, zero address for none) and referralCode (bytes32, zero for none). Reverts if you already have a Sickle or isActive() is false. The strategies also deploy one for you on your first deposit.
write getOrDeploy(address,address,bytes32)
Returns the owner's Sickle or deploys it. Only whitelisted callers (the strategy contracts) can call it, so users do not call this directly.
read predict(address)
Address the Sickle of an owner will have, before it is deployed. Approve this address for LP tokens or position NFTs before the first deposit.
read sickles(address)
Sickle wallet of an owner. Zero address if the owner has none yet.
read admins(address)
Owner of a Sickle wallet, given the Sickle address.
read referralCodes(address)
Referral code stored for a Sickle wallet (zero if none).
read isActive()
False when the factory has been paused, so deploy and getOrDeploy revert.
read implementation()
The Sickle implementation that every wallet is a clone of.
read registry()
SickleRegistry with the caller whitelist, target whitelist, referral codes and fee settings.
FarmStrategy, LP tokens (base)strategy on base0x9b381108Ef12A138a5b7cF231Fbbef4f20e72306
write deposit((address,uint256,address,bytes),address,bytes32)
Deposit LP tokens into a farm. First argument (params): lpToken, amountIn (token smallest unit), stakingContractAddress (the farm or MasterChef-style contract), extraData (protocol-specific bytes). Second: approved address for automation (zero for none). Third: referralCode (zero for none). Approve the caller's predicted Sickle for lpToken first, because tokens are pulled from the owner into the Sickle. Payable for native-token deposits.
write withdraw((address,uint256,address,bytes))
Withdraw LP tokens from a farm the caller has a position in. Argument (params): lpToken, amountOut (LP amount to withdraw), stakingContractAddress, extraData. Acts on the caller's own Sickle.
write harvest((address[],address,bytes))
Claim farm rewards to the caller. Argument (params): tokensOut (reward tokens to send back to the owner), stakingContractAddress, extraData. No approval needed.
write exit((address[],address,bytes),(address,uint256,address,bytes))
Harvest and withdraw in one call. First argument: harvest params (tokensOut, stakingContractAddress, extraData). Second argument: withdraw params (lpToken, amountOut, stakingContractAddress, extraData).
read getSickle(address)
Sickle wallet for an owner. Reverts if the owner has none.
read factory()
SickleFactory this strategy uses. Check it matches the factory for the chain before trusting the strategy.
read connectorRegistry()
ConnectorRegistry that maps farms to protocol connectors.
NftFarmStrategy, position NFTs (base)strategy on base0x9774E26f467f1aC603B63444bcdeb4B519a4F3ea
write depositErc721(address,uint256,address,bytes,address,bytes32)
Deposit an ERC721 liquidity position NFT into a farm. Arguments: nftContractAddress, tokenId, stakingContractAddress, extraData, approved (automation address, zero for none), referralCode (zero for none). Approve the caller's predicted Sickle for the NFT first (approve or setApprovalForAll), because the NFT is moved from the owner into the Sickle.
write withdrawErc721(address,uint256,address,bytes,address[])
Withdraw a farmed position NFT back to the owner. Arguments: nftContractAddress, tokenId, stakingContractAddress, extraData, rewardTokens (reward tokens to sweep back to the owner).
read getSickle(address)
Sickle wallet for an owner. Reverts if the owner has none.
read factory()
SickleFactory this strategy uses.
SickleFactory (arbitrum)factory on arbitrum0x53d9780DbD3831E3A797Fd215be4131636cD5FDf
write deploy(address,bytes32)
Create your own Sickle wallet (create2, salt = your address). Arguments: approved (address allowed to run automation, zero address for none) and referralCode (bytes32, zero for none). Reverts if you already have a Sickle or isActive() is false. The strategies also deploy one for you on your first deposit.
write getOrDeploy(address,address,bytes32)
Returns the owner's Sickle or deploys it. Only whitelisted callers (the strategy contracts) can call it, so users do not call this directly.
read predict(address)
Address the Sickle of an owner will have, before it is deployed. Approve this address for LP tokens or position NFTs before the first deposit.
read sickles(address)
Sickle wallet of an owner. Zero address if the owner has none yet.
read admins(address)
Owner of a Sickle wallet, given the Sickle address.
read referralCodes(address)
Referral code stored for a Sickle wallet (zero if none).
read isActive()
False when the factory has been paused, so deploy and getOrDeploy revert.
read implementation()
The Sickle implementation that every wallet is a clone of.
read registry()
SickleRegistry with the caller whitelist, target whitelist, referral codes and fee settings.
FarmStrategy, LP tokens (arbitrum)strategy on arbitrum0x32ddFf55910c80b188239fE670F8432094a64B72
write deposit((address,uint256,address,bytes),address,bytes32)
Deposit LP tokens into a farm. First argument (params): lpToken, amountIn (token smallest unit), stakingContractAddress (the farm or MasterChef-style contract), extraData (protocol-specific bytes). Second: approved address for automation (zero for none). Third: referralCode (zero for none). Approve the caller's predicted Sickle for lpToken first, because tokens are pulled from the owner into the Sickle. Payable for native-token deposits.
write withdraw((address,uint256,address,bytes))
Withdraw LP tokens from a farm the caller has a position in. Argument (params): lpToken, amountOut (LP amount to withdraw), stakingContractAddress, extraData. Acts on the caller's own Sickle.
write harvest((address[],address,bytes))
Claim farm rewards to the caller. Argument (params): tokensOut (reward tokens to send back to the owner), stakingContractAddress, extraData. No approval needed.
write exit((address[],address,bytes),(address,uint256,address,bytes))
Harvest and withdraw in one call. First argument: harvest params (tokensOut, stakingContractAddress, extraData). Second argument: withdraw params (lpToken, amountOut, stakingContractAddress, extraData).
read getSickle(address)
Sickle wallet for an owner. Reverts if the owner has none.
read factory()
SickleFactory this strategy uses. Check it matches the factory for the chain before trusting the strategy.
read connectorRegistry()
ConnectorRegistry that maps farms to protocol connectors.
NftFarmStrategy, position NFTs (arbitrum)strategy on arbitrum0x9D70B9E5ac2862C405D64A0193b4A4757Aab7F95
write depositErc721(address,uint256,address,bytes,address,bytes32)
Deposit an ERC721 liquidity position NFT into a farm. Arguments: nftContractAddress, tokenId, stakingContractAddress, extraData, approved (automation address, zero for none), referralCode (zero for none). Approve the caller's predicted Sickle for the NFT first (approve or setApprovalForAll), because the NFT is moved from the owner into the Sickle.
write withdrawErc721(address,uint256,address,bytes,address[])
Withdraw a farmed position NFT back to the owner. Arguments: nftContractAddress, tokenId, stakingContractAddress, extraData, rewardTokens (reward tokens to sweep back to the owner).
read getSickle(address)
Sickle wallet for an owner. Reverts if the owner has none.
read factory()
SickleFactory this strategy uses.
SickleFactory (bsc)factory on bsc0x53d9780DbD3831E3A797Fd215be4131636cD5FDf
write deploy(address,bytes32)
Create your own Sickle wallet (create2, salt = your address). Arguments: approved (address allowed to run automation, zero address for none) and referralCode (bytes32, zero for none). Reverts if you already have a Sickle or isActive() is false. The strategies also deploy one for you on your first deposit.
write getOrDeploy(address,address,bytes32)
Returns the owner's Sickle or deploys it. Only whitelisted callers (the strategy contracts) can call it, so users do not call this directly.
read predict(address)
Address the Sickle of an owner will have, before it is deployed. Approve this address for LP tokens or position NFTs before the first deposit.
read sickles(address)
Sickle wallet of an owner. Zero address if the owner has none yet.
read admins(address)
Owner of a Sickle wallet, given the Sickle address.
read referralCodes(address)
Referral code stored for a Sickle wallet (zero if none).
read isActive()
False when the factory has been paused, so deploy and getOrDeploy revert.
read implementation()
The Sickle implementation that every wallet is a clone of.
read registry()
SickleRegistry with the caller whitelist, target whitelist, referral codes and fee settings.
SickleFactory (avalanche)factory on avalanche0x53d9780DbD3831E3A797Fd215be4131636cD5FDf
write deploy(address,bytes32)
Create your own Sickle wallet (create2, salt = your address). Arguments: approved (address allowed to run automation, zero address for none) and referralCode (bytes32, zero for none). Reverts if you already have a Sickle or isActive() is false. The strategies also deploy one for you on your first deposit.
write getOrDeploy(address,address,bytes32)
Returns the owner's Sickle or deploys it. Only whitelisted callers (the strategy contracts) can call it, so users do not call this directly.
read predict(address)
Address the Sickle of an owner will have, before it is deployed. Approve this address for LP tokens or position NFTs before the first deposit.
read sickles(address)
Sickle wallet of an owner. Zero address if the owner has none yet.
read admins(address)
Owner of a Sickle wallet, given the Sickle address.
read referralCodes(address)
Referral code stored for a Sickle wallet (zero if none).
read isActive()
False when the factory has been paused, so deploy and getOrDeploy revert.
read implementation()
The Sickle implementation that every wallet is a clone of.
read registry()
SickleRegistry with the caller whitelist, target whitelist, referral codes and fee settings.
SickleFactory (monad)factory on monad0x233D9067677dCf1a161954D45B4C965B9d567168
write deploy(address,bytes32)
Create your own Sickle wallet (create2, salt = your address). Arguments: approved (address allowed to run automation, zero address for none) and referralCode (bytes32, zero for none). Reverts if you already have a Sickle or isActive() is false. The strategies also deploy one for you on your first deposit.
write getOrDeploy(address,address,bytes32)
Returns the owner's Sickle or deploys it. Only whitelisted callers (the strategy contracts) can call it, so users do not call this directly.
read predict(address)
Address the Sickle of an owner will have, before it is deployed. Approve this address for LP tokens or position NFTs before the first deposit.
read sickles(address)
Sickle wallet of an owner. Zero address if the owner has none yet.
read admins(address)
Owner of a Sickle wallet, given the Sickle address.
read referralCodes(address)
Referral code stored for a Sickle wallet (zero if none).
read isActive()
False when the factory has been paused, so deploy and getOrDeploy revert.
read implementation()
The Sickle implementation that every wallet is a clone of.
read registry()
SickleRegistry with the caller whitelist, target whitelist, referral codes and fee settings.