Beanstalk is a permissionless fiat stablecoin protocol built on Ethereum. Its primary objective is to incentivize independent market participants to regularly cross the price of 1 Bean over its dollar peg in a sustainable fashion.
Beanstalk is a permissionless fiat stablecoin protocol built on Ethereum. Its primary objective is to incentivize independent market participants to regularly cross the price of 1 Bean over its dollar peg in a sustainable fashion.
Beanstalk does not have any collateral requirements. Beanstalk uses credit instead of collateral to create Bean price stability relative to its value peg of $1. The practicality of using DeFi is currently limited by the lack of decentralized low-volatility assets with competitive carrying costs. Borrowing rates on USD stablecoins have historically been higher than borrowing rates on USD, even when supply increases rapidly. Non-competitive carrying costs are due to collateral requirements.
In particular, this audit is centered around the changes included in the Misc. Improvements BIP described in the PR comment here. The diff from this PR may be helpful to review in order to understand exactly which code in this audit is new and unaudited.
You can read an overview of how Beanstalk works here.
gm
caller
gm
function to start the next Season.The following contracts are in scope.
protocol/
└── contracts/
├── beanstalk/
│ ├── barn/
│ │ └── UnripeFacet.sol
│ ├── silo/
│ │ └── ConvertFacet.sol
│ └── sun/
│ └── SeasonFacet/
│ └── Sun.sol
└── libraries/
├── Convert/
│ ├── LibChopConvert.sol
│ ├── LibConvert.sol
│ ├── LibConvertData.sol
│ └── LibLambdaConvert.sol
├── LibChop.sol
├── LibFertilizer.sol
├── LibStrings.sol
├── LibUnripe.sol
└── Minting/
└── LibWellMinting.sol
Beanstalk implements the ERC-2535 Diamond standard. It supports various whitelists for Deposits, Minting, Converts, etc., particularly for LP tokens from Basin.
Blockchains:
Tokens:
Clone repo:
git clone https://github.com/Cyfrin/2024-05-Beanstalk-3
Install dependencies:
cd 2024-05-Beanstalk-3/protocol
yarn
Add RPC:
export FORKING_RPC=https://eth-mainnet.g.alchemy.com/v2/{RPC_KEY}
generate:
yarn generate
Test:
yarn test
All findings in the following resources are considered known issues: