There should be a cap on feeRate
#241
Labels
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
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")
Lines of code
https://github.com/code-423n4/2022-05-cally/blob/main/contracts/src/Cally.sol#L119-L121
https://github.com/code-423n4/2022-05-cally/blob/main/contracts/src/Cally.sol#L282-L286
Vulnerability details
Impact
The
feeRate
is unlimited inCally.sol
, leading to maliciously moving large taxes from this contract.Proof of Concept
There is no cap on
feeRate
https://github.com/code-423n4/2022-05-cally/blob/main/contracts/src/Cally.sol#L119-L121
When collecting protocol fee, unlimited
feeRate
could lead to maliciously obtaining large amounts of ETH from usershttps://github.com/code-423n4/2022-05-cally/blob/main/contracts/src/Cally.sol#L282-L286
Tools Used
None
Recommended Mitigation Steps
There should be a reasonable cap on
feeRate
. (e.g., 10%)The text was updated successfully, but these errors were encountered: