First Flight #18: T-Swap

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

event parameter mismatch in `TSwapPool::LiquidityAdded` Event

Summary

event parameter mismatch in TSwapPool::LiquidityAdded Event

Vulnerability Details

The TSwapPool::LiquidityAddedevent has 3 parameter liquidityProvider,wethDeposited,poolTokensDeposited when it was emitted in the _addLiquidityMintAndTransfer function the arguments weren't in order. The arguments wethDeposited and poolTokensDeposited positions were swapped. The argument position should be in order liquidityProvider,wethDeposited,poolTokensDeposited just as the event requires

Impact

Off-chain applications who uses the event parameter would receive wrong data

Tools Used

Manual review

Recommendations

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

Appeal created

inallhonesty Lead Judge about 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.