First Flight #18: T-Swap

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

swapExactInput always return 0

Summary

The function swapExactInput does not assign a value to the return variable, it will always return zero.

Vulnerability Details

Impact

Protocol user will get wrong value of how much did he receive when swapping using swapExactInput.

Tools Used

sloc

Recommendations

Here assign the value to the output variable instead of creating new one
https://github.com/agent3bood/2024-06-t-swap/blob/main/src/TSwapPool.sol#L311

Updates

Appeal created

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

Default value returned by TSwapPool::swapExactInput results in incorrect return value given

Support

FAQs

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