wrong minting amount
The RebaseProxy contract's minting function used the proxy's total base balance instead of the amount being minted, causing an incorrect number of tokens to be minted. An attacker could potentially exploit this to mint an excessive amount of tokens.
Submitted by danb
https://github.com/code-423n4/2022-01-behodler/blob/main/contracts/TokenProxies/RebaseProxy.sol#L36
uint256 proxy = (baseBalance * ONE) / _redeemRate;
should be:
uint256 proxy = (amount * ONE) / _redeemRate;
gititGoro (Behodler) confirmed, but disagreed with High severity and commented:
Should be a balanceBefore and balanceAfter calculation with the diff being wrapped.
Jack the Pug (judge) commented:
Valid
high. The issue description can be more comprehensive though.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
What the attacker needed
Access to the mint function
The fix
The calculation should use the amount parameter instead of baseBalance, and the sponsor suggested using balanceBefore and balanceAfter with the difference being wrapped.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
This is a smart contract bug where a calculation used the wrong number. The code multiplied the contract's total balance instead of the amount the user wanted to mint, so users could get far more tokens than they should.
What is Business logic?
The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.