Missing minReturn
check for user deposits
#58
Labels
bug
Something isn't working
duplicate
This issue or pull request already exists
QA (Quality Assurance)
Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
sponsor disputed
Sponsor cannot duplicate the issue, or otherwise disagrees this is an issue
Lines of code
https://github.com/code-423n4/2022-03-prepo/blob/f63584133a0329781609e3f14c3004c1ca293e71/contracts/core/Collateral.sol#L210
Vulnerability details
Impact
The owners of the contract can set a minting fee.
A user might want to deposit at the current minting fee, while their transaction is pending, a new
setMintingFee
transaction is mined.The user receives fewer shares than they expected and essentially loses funds due to the higher fees.
Recommended Mitigation Steps
Accept a
minShares
parameter indeposit
and check if_shares >= minShares
.The text was updated successfully, but these errors were encountered: