Not possible to set maximum fee in Swap.sol #156
Labels
1 (Low Risk)
Assets are not at risk. State handling, function incorrect as to spec, issues with comments
bug
Something isn't working
duplicate
This issue or pull request already exists
sponsor confirmed
Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")
Handle
loop
Vulnerability details
When setting the fees, the parameters
_fee
,_adminFee
and_withdrawFee
are used. These parameters can however not be set to the maximum fee value due to require statements having a requirement of them being less than the max fee.Proof of Concept
https://github.com/code-423n4/2021-11-bootfinance/blob/main/customswap/contracts/Swap.sol#L192-L200
Recommended Mitigation Steps
Change
<
to<=
to include the maximum fee as well.The text was updated successfully, but these errors were encountered: