Start typing to search this publication.
crypto.news logo crypto.news
Open menu
crypto.news logo

Subscribe to crypto.news

Get new posts delivered straight to your inbox.

How does the Beefy app work? From vault deposit to withdrawal

crypto.news avatar crypto.news
3 min read

The Beefy app lets you deposit a vault’s want token, receive mooTokens representing your share, and withdraw by burning those shares for want tokens after a strategy has farmed and compounded rewards. The Beefy app adds useful background to this flow: the Beefy vault app is the interface to the multichain optimizer behind the contracts. A successful deposit leaves mooTokens in your wallet; a successful withdrawal replaces the redeemed shares with the want token.

Beefy app deposits mint shares while the strategy compounds

A Beefy Vault accepts a specific want token, which may be an LP token or a single asset. Before depositing, your wallet needs an ERC-20 approval for the vault to spend that token. On Ethereum, the EIP-20 approve provision defines an allowance for a named spender up to a stated amount. Here, the vault is the spender; its deposit call uses that allowance to transfer the want token from your wallet.

The vault mints mooTokens in proportion to your share of its existing want-token balance. These receipt shares are your claim on the vault, so keep them in a wallet you control. The vault then sends the deposited want token to a separate strategy contract. The strategy stakes funds in the underlying farm, harvests rewards, converts them back into the want token, and reinvests them.

Successful compounding increases the vault’s want-token balance relative to its outstanding mooTokens. Your share count stays fixed between your own deposits, transfers, and withdrawals; its redemption value changes instead. Position value in want tokens equals your mooTokens multiplied by the current price per share. Beefy Vaults calculate that price from the total want-token balance divided by total shares. Read the value in want tokens first: a change in that token’s market price is a separate change in your position’s value.

A strategy can change before your shares are redeemed

A Beefy Vault can replace the strategy farming its funds while your mooTokens remain in your wallet. The vault and strategy are separate contracts: the vault accounts for shares and withdrawals, while the strategy controls how funds are deployed. That separation lets a vault retain existing positions when its farming strategy changes, but it also means the code handling your funds can change after you deposit.

The vault owner first proposes a replacement strategy. The vault’s approval delay must pass before the owner can execute the switch. On execution, the old strategy retires and returns funds to the vault, which directs them to the new strategy. Beefy’s vault contract documentation describes this as a proposeStrat() transaction followed by upgradeStrat(). For an open position, watch the vault’s strategy announcements and the proposed strategy address during the delay; a proposal tells you what code may handle your funds next.

When you withdraw, the vault calculates the want tokens owed for the mooTokens you redeem, burns those shares, and transfers the want token to your wallet. If the vault needs funds held by the strategy, it requests them before paying you. The amount depends on the current price per share: compounding can raise it, while losses can reduce it. For a supported LP vault, Beefy ZAP can combine redemption with conversion into a single asset; the underlying share redemption still determines what the vault returns.

  • Deposit the vault’s want token to receive mooTokens representing your share.

  • Read gains through price per share, rather than a rising mooToken count.

  • Monitor proposed strategy changes while your position is open.

  • Burn mooTokens to redeem your share in the want token.

Subscribe to crypto.news