52178 sc critical user will lose the unspent amount when executing partial swaps via okxrouter
Description
Brief/Intro
Vulnerability Details
// In _smartSwapInternal
uint256 totalBatchAmount;
for (uint256 i = 0; i < batchesAmount.length; ) {
totalBatchAmount += batchesAmount[i];
unchecked {
++i;
}
}
require(
totalBatchAmount <= _baseRequest.fromTokenAmount,
"Route: number of batches should be <= fromTokenAmount"
);Impact Details
Recommendation
Proof of Concept
Previous49787 sc high batched yield distribution doesn t account for transfers purchases between batchesNext51296 sc low arctokenpurchase withdrawal breaks view functions
Was this helpful?