Max Approval #458
Labels
bug
Something isn't working
downgraded by judge
Judge downgraded the risk level of this issue
duplicate-70
grade-b
insufficient quality report
This report is not of sufficient quality
Q-64
QA (Quality Assurance)
Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
Lines of code
https://github.com/code-423n4/2023-11-kelp/blob/f751d7594051c0766c7ecd1e68daeb0661e43ee3/src/NodeDelegator.sol#L38
Vulnerability details
Impact
For safety, the approval should not be set to the max value, especially if the amount that the contract may use is already known in this call. If the contract is compromised, it can steal all the tokens.
Proof of Concept
Tools Used
Manual Review
Recommended Mitigation Steps
Only approve appropriate amounts before transfer.
Assessed type
ERC20
The text was updated successfully, but these errors were encountered: