First Flight #18: T-Swap

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

Define and use `constant` variables instead of using literals

L-2: Define and use constant variables instead of using literals

Tool Used : Aderyn

If the same constant literal value is used multiple times, create a constant state variable and reference it throughout the contract.

4 Found Instances
  • Found in src/TSwapPool.sol Line: 229

    uint256 inputAmountMinusFee = inputAmount * 997; //@ issue dont use magic number (997)
  • Found in src/TSwapPool.sol Line: 246

    return ((inputReserves * outputAmount) * 10000) / ((outputReserves - outputAmount) * 997);
  • Found in src/TSwapPool.sol Line: 360

    1e18, i_wethToken.balanceOf(address(this)), i_poolToken.balanceOf(address(this))
  • Found in src/TSwapPool.sol Line: 366

    1e18, i_poolToken.balanceOf(address(this)), i_wethToken.balanceOf(address(this))
Updates

Appeal created

inallhonesty Lead Judge 11 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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