Skip to content
DoS Audit finding Intermediate

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.

The original report as published on Code4rena. Images and videos are our own copies; raw HTML is shown as text. View it on Code4rena.

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.

More from Larva Labs Meebits

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Denial of service

The lesson behind this report.

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.