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.
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.
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.