Missing payable
A function in a smart contract uses msg.value but is not marked payable, so users cannot send native ether to it. This prevents users from adding reserves using native ether.
OpenLeverage contest
MediumCode4rena
Every publicly disclosed report for OpenLeverage contest and what kind of bugs they were.
Newest first. Only what OpenLeverage contest chose to make public.
A function in a smart contract uses msg.value but is not marked payable, so users cannot send native ether to it. This prevents users from adding reserves using native ether.
OpenLeverage contest
MediumOpenLeverage contest
MediumA price check meant to block flash-loan attacks could prevent liquidations during a sustained market downturn, leaving the protocol under-collateralised. An attacker could not directly exploit this, but the design flaw could cause bad debt for lenders.
OpenLeverage contest
MediumThe smart contracts use Solidity's transfer() to send native tokens, which forwards only a fixed 2300 gas stipend. If the recipient is a smart contract with a costly fallback function, the transfer fails, so users cannot withdraw their funds or close trades.
OpenLeverage contest
HighThe contract uses the DEX's reported swap output as the actual amount received, but for fee-on-transfer tokens the actual received amount is less. An attacker could exploit this to drain contract funds or cause position closes to fail, freezing user funds.
OpenLeverage contest
MediumThe uniClassSell function in a Uniswap V2-style DEX wrapper trusted the output amount calculated by getAmountOut instead of measuring the actual received amount, so tokens with transfer fees could cause the user to receive less than the specified minimum. An attacker could exploit this to cause value leakage through increased slippage.
OpenLeverage contest
Medium