BTB
/

Yearn Finance V3

Yield Aggregatorwebsite
Yearn V3 vaults are ERC-4626 vaults that put deposits to work in strategies. An agent can find endorsed vaults in the registry, deposit an asset through the 4626 Router, and redeem shares or withdraw the asset.

What you can do

find-vaultFind endorsed vaults for an assetRegistry.getEndorsedVaults(asset) on the chain you want; check isEndorsed(vault) before depositing
depositDeposit an asset into a vaultapprove the 4626 Router for the asset, then Router.deposit(vault, amount, to, minSharesOut)
redeemRedeem vault sharesapprove the Router for the vault shares, then Router.redeem(vault, shares, to, maxLoss)
withdrawWithdraw an exact amount of the assetapprove the Router for the vault shares, then Router.withdraw(vault, amount, to, maxLoss)
Vault strategies can lose money. Yearn vaults do not guarantee the deposited amount.
Vaults have their own fees, role managers and strategies. Governance and role managers can change them.
Retired or shut down vaults may not allow new deposits. Check isEndorsed and read the vault before depositing.
Withdrawals can be limited by liquidity in the strategies. Set maxLoss with care.

Contracts

Read any function, or build a write and sign it. Amounts are in base units (1 USDC = 1000000).
V3 Registry (current, stable address on all EVM chains)other on ethereum0xd40ecF29e001c76Dcc4cC0D9cd50520CE845B038
read getEndorsedVaults(address)
List the endorsed vault addresses for an asset. Argument: the underlying asset token address. Use this to find vaults to deposit into.
read numEndorsedVaults(address)
How many endorsed vaults exist for an asset. Argument: the underlying asset token address.
read isEndorsed(address)
Check whether a vault is endorsed in this registry. Argument: the vault address.
read vaultInfo(address)
Registry record for a vault. Returns a tuple with the vault asset, a timestamp, and a tag string; check the registry source for the field order.
read getAssets()
List the underlying assets that have endorsed vaults in this registry.
read numAssets()
How many underlying assets the registry tracks.
V3 Registry (current)other on base0xd40ecF29e001c76Dcc4cC0D9cd50520CE845B038
read getEndorsedVaults(address)
List the endorsed vault addresses for an asset. Argument: the underlying asset token address. Use this to find vaults to deposit into.
read numEndorsedVaults(address)
How many endorsed vaults exist for an asset. Argument: the underlying asset token address.
read isEndorsed(address)
Check whether a vault is endorsed in this registry. Argument: the vault address.
read vaultInfo(address)
Registry record for a vault. Returns a tuple with the vault asset, a timestamp, and a tag string; check the registry source for the field order.
read getAssets()
List the underlying assets that have endorsed vaults in this registry.
read numAssets()
How many underlying assets the registry tracks.
V3 Registry (current)other on arbitrum0xd40ecF29e001c76Dcc4cC0D9cd50520CE845B038
read getEndorsedVaults(address)
List the endorsed vault addresses for an asset. Argument: the underlying asset token address. Use this to find vaults to deposit into.
read numEndorsedVaults(address)
How many endorsed vaults exist for an asset. Argument: the underlying asset token address.
read isEndorsed(address)
Check whether a vault is endorsed in this registry. Argument: the vault address.
read vaultInfo(address)
Registry record for a vault. Returns a tuple with the vault asset, a timestamp, and a tag string; check the registry source for the field order.
read getAssets()
List the underlying assets that have endorsed vaults in this registry.
read numAssets()
How many underlying assets the registry tracks.
V3 Registry (current)other on optimism0xd40ecF29e001c76Dcc4cC0D9cd50520CE845B038
read getEndorsedVaults(address)
List the endorsed vault addresses for an asset. Argument: the underlying asset token address. Use this to find vaults to deposit into.
read numEndorsedVaults(address)
How many endorsed vaults exist for an asset. Argument: the underlying asset token address.
read isEndorsed(address)
Check whether a vault is endorsed in this registry. Argument: the vault address.
read vaultInfo(address)
Registry record for a vault. Returns a tuple with the vault asset, a timestamp, and a tag string; check the registry source for the field order.
read getAssets()
List the underlying assets that have endorsed vaults in this registry.
read numAssets()
How many underlying assets the registry tracks.
VaultFactory 3.1.1factory on ethereum0x311de24e48C360B9A7765E7aB7eCDBABCd27B134
write deploy_new_vault(address,string,string,address,uint256)
Deploy a new Yearn V3 vault. Arguments: asset, name, symbol, role_manager (address that manages the vault roles), profit_max_unlock_time (seconds over which profits unlock).
4626 Routerrouter on ethereum0x1112dbCF805682e828606f74AB717abf4b4FD8DE
write deposit(address,uint256,address,uint256)
Deposit an asset into a Yearn V3 vault and receive vault shares. Arguments: vault address, amount of the asset in its smallest unit, to (who receives the shares), minSharesOut (the call reverts if fewer shares would be minted). Approve the router for the asset first. Native ETH can be sent as value only for a wrapped-native asset.
write redeem(address,uint256,address,uint256)
Redeem vault shares for the underlying asset. Arguments: vault address, shares to redeem, to (receiver of the assets), maxLoss (loss allowed, in basis points). Approve the router for the vault shares first.
write withdraw(address,uint256,address,uint256)
Withdraw an exact amount of the underlying asset from a vault. Arguments: vault address, amount of the asset, to (receiver), maxLoss (basis points). Approve the router for the vault shares first.
read WETH9()
Address of the wrapped ETH token the router uses for native ETH deposits.
4626 Routerrouter on base0x1112dbCF805682e828606f74AB717abf4b4FD8DE
write deposit(address,uint256,address,uint256)
Deposit an asset into a Yearn V3 vault and receive vault shares. Arguments: vault address, amount of the asset in its smallest unit, to (who receives the shares), minSharesOut (the call reverts if fewer shares would be minted). Approve the router for the asset first. Native ETH can be sent as value only for a wrapped-native asset.
write redeem(address,uint256,address,uint256)
Redeem vault shares for the underlying asset. Arguments: vault address, shares to redeem, to (receiver of the assets), maxLoss (loss allowed, in basis points). Approve the router for the vault shares first.
write withdraw(address,uint256,address,uint256)
Withdraw an exact amount of the underlying asset from a vault. Arguments: vault address, amount of the asset, to (receiver), maxLoss (basis points). Approve the router for the vault shares first.
read WETH9()
Address of the wrapped ETH token the router uses for native ETH deposits.
4626 Routerrouter on arbitrum0x1112dbCF805682e828606f74AB717abf4b4FD8DE
write deposit(address,uint256,address,uint256)
Deposit an asset into a Yearn V3 vault and receive vault shares. Arguments: vault address, amount of the asset in its smallest unit, to (who receives the shares), minSharesOut (the call reverts if fewer shares would be minted). Approve the router for the asset first. Native ETH can be sent as value only for a wrapped-native asset.
write redeem(address,uint256,address,uint256)
Redeem vault shares for the underlying asset. Arguments: vault address, shares to redeem, to (receiver of the assets), maxLoss (loss allowed, in basis points). Approve the router for the vault shares first.
write withdraw(address,uint256,address,uint256)
Withdraw an exact amount of the underlying asset from a vault. Arguments: vault address, amount of the asset, to (receiver), maxLoss (basis points). Approve the router for the vault shares first.
read WETH9()
Address of the wrapped ETH token the router uses for native ETH deposits.
4626 Routerrouter on optimism0x1112dbCF805682e828606f74AB717abf4b4FD8DE
write deposit(address,uint256,address,uint256)
Deposit an asset into a Yearn V3 vault and receive vault shares. Arguments: vault address, amount of the asset in its smallest unit, to (who receives the shares), minSharesOut (the call reverts if fewer shares would be minted). Approve the router for the asset first. Native ETH can be sent as value only for a wrapped-native asset.
write redeem(address,uint256,address,uint256)
Redeem vault shares for the underlying asset. Arguments: vault address, shares to redeem, to (receiver of the assets), maxLoss (loss allowed, in basis points). Approve the router for the vault shares first.
write withdraw(address,uint256,address,uint256)
Withdraw an exact amount of the underlying asset from a vault. Arguments: vault address, amount of the asset, to (receiver), maxLoss (basis points). Approve the router for the vault shares first.
read WETH9()
Address of the wrapped ETH token the router uses for native ETH deposits.