Legacy Function Usage
The withdraw function uses the transfer invocation, which has a fixed gas stipend and can fail, especially after the Berlin fork increased gas costs for first-time invocations. An attacker could cause withdrawals to fail by making the recipient a contract that consumes more gas than the stipend allows.
Larva Labs Meebits
Originally disclosed on Code4rena
The withdraw function utilizes the transfer invocation, which has a fixed gas stipend and can fail, especially beyond the Berlin fork, which increased the gas costs for first-time invocations of a transfer.
The EIP should be sufficient.
Recommend using a safe wrapper library, such as the OpenZeppelin Address library’s sendValue function, which forwards sufficient gas for the transfer regardless of the underlying OPCODE gas costs.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
What the attacker needed
Victim is a contract receiving Ether; contract needs more gas than stipend
The fix
It should be fixed by using a safe wrapper library such as OpenZeppelin's Address library's sendValue function, which forwards sufficient gas.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
When a smart contract sends Ether, it can use a method called transfer that only gives the receiving contract a small, fixed amount of gas to run its code. If the receiver needs more gas than that, the send fails and the withdrawal does not go through. This means a user could be unable to withdraw their funds if their receiving contract is slightly more complex than expected.
What is DoS?
A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.