Admin cannot collect protocol fee due to Incorrect Parameter Order in ERC20 Transfer Function Call #72
Labels
3 (High Risk)
Assets can be stolen/lost/compromised directly
bug
Something isn't working
duplicate-84
🤖_38_group
AI based duplicate group recommendation
satisfactory
satisfies C4 submission criteria; eligible for awards
sufficient quality report
This report is of sufficient quality
Lines of code
https://github.com/code-423n4/2024-08-superposition/blob/main/pkg/seawater/src/lib.rs#L1149-L1150
Vulnerability details
Impact
Either way admin cannot collect the protocol fee
Proof of Concept
In the
collect_protocol_7540_F_A_9_F
function, there is a misuse of theerc20::transfer_to_addr
function. The correct parameter order for this function is (token, recipient, amount)https://github.com/code-423n4/2024-08-superposition/blob/main/pkg/seawater/src/wasm_erc20.rs#L158
but in the current implementation, the order is incorrect as it sending recipient in place of token Address .
Tools Used
Manual Review
Recommended Mitigation Steps
Correct the parameter order in the
erc20::transfer_to_addr
function calls:Assessed type
Token-Transfer
The text was updated successfully, but these errors were encountered: