Summary: The BeanstalkERC20 smart contract allows for unlimited minting of tokens, which can lead to severe inflation and devaluation of the token. There is no cap on the total supply of tokens that can be minted, allowing the MINTER_ROLE to create an infinite number of tokens.
Steps to Reproduce:
Deploy the BeanstalkERC20 contract with any admin address. Using an account with the MINTER_ROLE, call the mint function with any address and a large amount of tokens (e.g., 1e30). Observe that the contract allows minting without any restriction on the total supply. Expected Behavior: The contract should restrict the minting of tokens by implementing a total supply cap. The mint function should revert if the minting exceeds the predefined cap.
Actual Behavior: The contract currently allows unlimited minting of tokens without any cap, potentially leading to an infinite supply of tokens.
Impact:
Inflation: Unlimited minting can lead to severe inflation, devaluing the token and harming token holders. Trust: The absence of a supply cap undermines trust in the token's economic model and can deter potential investors. Market Manipulation: An entity with the MINTER_ROLE can flood the market with new tokens, manipulating the token price and market dynamics.
Mitigation: Adopting the above fix will mitigate the risk of unlimited minting, preserving the token's value and maintaining trust among token holders and potential investors.
Proof of concept
Here is a PoC that demonstrates the issue using Hardhat: const { expect } = require("chai");
describe("BeanstalkERC20 Unlimited Minting", function () { let BeanstalkERC20; let beanstalk; let owner; let addr1;
Unfortunately, after reviewing your report, Immunefi has decided to close it due to the assessed impact being out of scope.
Immunefi review:
The claimed impact "Illegitimate minting of protocol native assets" by the whitehat is not in scope of the bug bounty program but the assessed impact doesn't match with the claimed impact for the following reasons.
Impacts caused by attacks requiring access to privileged addresses (owner address) are Out of scope
assessed asset by the triage team is in scope for the bug bounty program
PoC has been submitted to the project
Please note that the project will receive a report of the closed submission and may choose to re-open it, but they are not obligated to do so.