Skip to main content
Multi-chain yield optimizer. Auto-compounds rewards from LP tokens and other yield sources across many chains.

What it offers

  • deposit: Deposit want tokens into Beefy vault
  • depositAll: Deposit entire balance of want token
  • withdraw: Withdraw by specifying share amount
  • withdrawAll: Withdraw entire position

Notes

  • Each vault has a unique address per strategy
  • Approve want token to vault before depositing
  • Use want() to discover which token a vault accepts
  • getPricePerFullShare() returns the exchange rate between shares and want tokens
  • Auto-compounds rewards - no manual claiming needed

Its names in a program

On Ethereum, Beefy is a namespace: its contracts need no import.

Deployments

ABI

Where a line says what an address it returns is, a program that calls the function through its namespace calls that contract’s methods on the result directly: <Namespace>.<Contract>.<function>(...).<method>(...). A token’s methods are the ERC-20 functions, and its writes are SafeERC20.

BeefyVaultABI

import BeefyVaultABI from "./protocols/beefy/BeefyVaultABI.json";
  • deposit(uint256 _amount)
  • depositAll()
  • withdraw(uint256 _shares)
  • withdrawAll()
  • getPricePerFullShare() view returns (uint256)
  • balance() view returns (uint256)
  • balanceOf(address account) view returns (uint256)
  • want() view returns (address): the address is a token

Next steps