First Flight #18: T-Swap

First Flight #18
Beginner FriendlyDeFiFoundry
100 EXP
View results
Submission Details
Severity: low
Valid

The parameters for `TSwapPool::LiquidityAdded` are out of order

Summary

Values are in the incorrect order when the LiquidityAdded event emits in TSwapPool::_addLiquidityMintAndTransfer.

Vulnerability Details

The poolTokensToDeposit and wethToDeposit parameters should be swapped.

Impact

Incorrect event emission resulting in improper off-chain functions

Tools Used

Manual Review

Recommendations

Rearrange the parameters as follows:

- emit LiquidityAdded(msg.sender, poolTokensToDeposit, wethToDeposit);
+ emit LiquidityAdded(msg.sender, wethToDeposit, poolTokensToDeposit);
Updates

Appeal created

inallhonesty Lead Judge over 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

`LiquidityAdded` event has parameters out of order

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.