Skip to content

Latest commit

 

History

History

depot

Farm

{% hint style="warning" %} Note that this page has not been updated to reflect the current state of Beanstalk, but is left here as a reference. {% endhint %}

The Farm allows Farmers to call multiple functions in a single transaction and use assets between different functions in a composable manner, without those assets every leaving Beanstalk (thanks to Internal Balances). Internal Balances allow the farm function to use the output of a function in the next function call.

The Farm also provides composable Beanstalk-native interfaces for other DeFi protocols. This allows Farmers to call supported external protocols through the farm function and leverage Internal Balances. The current protocols that the Farm supports are:

  • WETH -> wrapping and unwrapping; and
  • Curve -> swapping and adding/removing liquidity.
  • Pipeline -> performing an arbitrary series of actions in the EVM in a single transaction.

The Farm creates an interface to transfer ERC-20 tokens between Internal and External Balances, as well as between Farmers through the transferToken function.

The Farm consists of 5 facets: