Part 2

Zaros
PerpetualsDEXFoundrySolidity
70,000 USDC
View results
Submission Details
Severity: low
Invalid

In FeeDistributionBranch.sol::_performMultiDexSwap absence of leftover or partial handling in multi-dex swap can lock tokens

Summary

The function _performMultiDexSwap does not handle leftover tokens, potentially locking them.

Vulnerability Details

  • The function does not account for leftover tokens after swaps.

  • Accumulated rounding errors could result in discrepancies.

function _performMultiDexSwap(
AssetSwapPath.Data memory swapPath,
uint256 assetAmount
) internal returns (uint256) {
// ...calls executeSwapExactInputSingle in a loop...
// The function does not handle leftover or partial tokens, returning the
final amount only.
}

Impact

Locked tokens due to unhandled leftovers.

Tools Used

Manual code review.

Recommendations

  • Implement handling for leftover tokens.

  • Ensure all tokens are accounted for after swaps.

Updates

Lead Judging Commences

inallhonesty Lead Judge 10 months ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

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

Give us feedback!