Users can prevent protocol from rebalancing for his gain and cause loss of funds for protocol and its users
mrMorningstar Follow with 0xGondar, bumbleb33 and 2 others
Originally disclosed on Code4rena
Submitted by mrMorningstar, also found by 0xGondar, bumbleb33, bumbleb33, and Evo
The protocol have a vETH token that aims to be pegged to the ETH so the ration of vETH -> ETH = 1:1. When depeg happens the protocol can mitigate that via rebalance function in LamboRebalanceOnUniwap that looks like this:
function rebalance(uint256 directionMask, uint256 amountIn, uint256 amountOut) external nonReentrant {
uint256 balanceBefore = IERC20(weth).balanceOf(address(this));
bytes memory data = abi.encode(directionMask, amountIn, amountOut);
IMorpho(morphoVault).flashLoan(weth, amountIn, data);
uint256 balanceAfter = IERC20(weth).balanceOf(address(this));
uint256 profit = balanceAfter - balanceBefore;
require(profit > 0, "No profit made");
}
This function is designed to rebalance ratio by taking a flashloan from MorphoVault, which will be used on UniswapV3 to make a swap, while at the same time make sure there is a profit for the caller which later can be transferred via the extractProfit function in the same contract.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
What is known
A medium-severity business logic bug in Lambo.win. Code4rena made it public on 3 February 2025. Found in the 2024-12-lambowin audit contest (finding M-08), also found by 4 other wardens.
About Business logic
The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
What is Business logic?
The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.