58730 sc medium an attacker can prevent any tokenauto strategy allocation by making a donation to the vault of as little as 1 wei of underlying token
Description
Brief/Intro
//From AutopilotRouter.sol depositMax
function depositMax(
IAutopool vault,
address to,
uint256 minSharesOut
) public payable override returns (uint256 sharesOut) {
IERC20 asset = IERC20(vault.asset());
uint256 assetBalance = asset.balanceOf(msg.sender);
uint256 maxDeposit = vault.maxDeposit(to);
uint256 amount = maxDeposit < assetBalance ? maxDeposit : assetBalance;
pullToken(asset, amount, address(this));
approve(IERC20(vault.asset()), address(vault), amount);
return deposit(vault, to, amount, minSharesOut);
}
//From Autopool4626.sol transferAndMint function:
baseAsset.safeTransferFrom(msg.sender, address(this), assets);Vulnerability Details
Impact Details
References
Proof of Concept
Proof of Concept
Previous57964 sc low improper validation of absolutecap and relativecap enables excessive fund allocation in alchemistallocator Next57752 sc medium aave and euler incentives for myt will be lost due to unimplemented claimrewards function
Was this helpful?