#41633 [SC-High] Users might lose some of the rewards they’re supposed to get.
Description
Brief/Intro
Vulnerability Details
/// @dev Bera is sent to the receiver. Any extra token0 and token1 is sent back to the _msgSender().
/// @dev integrating contracts must handle any returned token0 and token1
function zapOutNative(
address receiver,
SingleTokenSwap calldata swapData0,
SingleTokenSwap calldata swapData1,
IZapper.KodiakVaultUnstakingParams calldata unstakeParams,
IZapper.VaultRedeemParams calldata redeemParams
) public nonReentrant onlyWhitelistedKodiakVaults(unstakeParams.kodiakVault) returns (uint256 totalNativeOut) {
(IERC20 token0, IERC20 token1, uint256 token0Debt, uint256 token1Debt) = _yeetOut(redeemParams, unstakeParams);
if (token0Debt == 0 && token1Debt == 0) {
return (0);
}
totalNativeOut = _swapToWBERA(token0, token1, token0Debt, token1Debt, swapData0, swapData1);
_sendNativeToken(receiver, totalNativeOut);
}Impact Details
References
Proof of Concept
Proof of Concept
Previous#41624 [SC-Medium] Reward sandwich is possible in `MoneyBrinter` vault by frontrunning `compound`.Next#41635 [SC-Low] MoneyBrinter contract is EIP-4626 incompliant
Was this helpful?