Skip to content
Business logic Audit finding Beginner

BathBuddy locks up Ether it receives

The BathBuddy contract can receive Ether through a receive function but has no way to withdraw it, so any Ether sent becomes permanently locked. The author notes no current protocol logic sends Ether to the contract, but future use could cause loss of funds.

Ruhum Follow

Originally disclosed on Code4rena

Submitted by Ruhum, also found by 0x1f8b and pauliax

The BathBuddy contract is able to receive ETH. But, there’s no way of ever retrieving that ETH from the contract. The funds will be locked up.

Currently, there seems to be no logic in the protocol where ETH is sent to the contract. But, it might happen in the future. So I’d say it’s a MED issue.

Proof of Concept

receive() function: https://github.com/code-423n4/2022-05-rubicon/blob/main/contracts/peripheral_contracts/BathBuddy.sol#L69

Recommended Mitigation Steps

Remove the receive() function if the contract isn’t supposed to handle ETH. Otherwise, add the necessary logic to release the ETH it gets.

bghughes (Rubicon) confirmed


The original report as published on Code4rena, by Ruhum. 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

Root cause

The contract includes a receive function that accepts Ether but lacks any withdrawal or transfer logic to move Ether out.

Impact

Any Ether sent to the contract would be permanently locked, though the report notes no current protocol logic sends Ether to it.

What the attacker needed

Ether sent to the contract

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.

A smart contract can have a special function that lets it accept Ether (the cryptocurrency used on Ethereum). If the contract has no function to send that Ether back out, the money is stuck forever. This report points out that BathBuddy can receive Ether but cannot release it.

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.

More by Ruhum

View all

55 more disclosed reports, best first.

More from Rubicon v2

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.