DeFiFoundrySolidity
16,653 OP
View results
Submission Details
Severity: medium
Valid

The underlying token is locked at the `StrategyMainnet` contract

Summary

The underlying tokens which could appear at the StrategyMainnet balance can't be withdrawn, i.e. locked at the contract permanently.

Vulnerability Details

The claimAndSwap function swaps exactly _amountClaim and ignores the contract balance.

function claimAndSwap(
>> uint256 _amountClaim,
uint256 _minOut,
uint256 _routeNumber
) external onlyKeepers {
transmuter.claim(_amountClaim, address(this));
uint256 balBefore = asset.balanceOf(address(this));
require(_minOut > _amountClaim, "minOut too low");
router.exchange(
routes[_routeNumber],
swapParams[_routeNumber],
>> _amountClaim,
_minOut,
pools[_routeNumber],
address(this)
);
uint256 balAfter = asset.balanceOf(address(this));
require((balAfter - balBefore) >= _minOut, "Slippage too high");
transmuter.deposit(asset.balanceOf(address(this)), address(this));
}

Impact

Asset locking/losses.

Tools used

Manual Review

Recommendations

Consider swapping the contract's underlying.balanceOf as in other strategies.

Updates

Appeal created

inallhonesty Lead Judge 5 months ago
Submission Judgement Published
Validated
Assigned finding tags:

Dormant WETH in the contract will never be swapped back to alETH

0xkann Auditor
5 months ago
inallhonesty Lead Judge
5 months ago
inallhonesty Lead Judge 5 months ago
Submission Judgement Published
Validated
Assigned finding tags:

Dormant WETH is not properly treated

Support

FAQs

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