DeFiFoundrySolidity
16,653 OP
View results
Submission Details
Severity: high
Invalid

Due to incorrect design in `IRamses::swapExactTokensForTokens` the protocol is not compatible with Ramses exchange

Summary

The current design of IRamses interface looks like this:

interface IRamsesRouter {
struct route {
address from;
address to;
bool stable;
}
function swapExactTokensForTokens(
uint256 amountIn,
uint256 amountOutMin,
route[] calldata routes,
address to,
uint256 deadline
) external;
}

Vulnerability Details

The issue here is that swapExactTokensForTokens is missing a return value, which makes it incompatible with Ramses exchange and not able to correctly process returned values.

Impact

Protocol is not compatible with Ramses exchange.

Tools Used

Manual Review

Recommendations

Make following changes in swapExactTokensForTokens:

interface IRamsesRouter {
struct route {
address from;
address to;
bool stable;
}
function swapExactTokensForTokens(
uint256 amountIn,
uint256 amountOutMin,
route[] calldata routes,
address to,
uint256 deadline
+ ) external returns (uint256[] memory amounts);
}
Updates

Appeal created

inallhonesty Lead Judge 6 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
inallhonesty Lead Judge 6 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.