Skip to content
Business logic Audit finding Intermediate

Unhandled request invalidation by the owner of Etherfi will lead to stuck debt

The owner of Etherfi's WithdrawRequestNFT can invalidate a withdrawal request, which prevents the BendDAO protocol from claiming the withdrawal and repaying its debt. The owner can then claim the invalidated request for itself, leaving the debt permanently stuck.

0x73696d616f Follow

Originally disclosed on Code4rena

Submitted by 0x73696d616f

The owner of Etherfi has the ability to invalidate withdrawal requests, which will DoS YieldEthStakingEtherfi::protocolClaimWithdraw() without ever repaying the debt. Additionally, Etherfi has a mechanism to manually claim the invalidated withdrawal, which will leave the withdraw request in a DoSed state in YieldEthStakingEtherfi.

Proof of Concept

WithdrawRequestNFT::claimWithdraw() from Etherfi checks that the request is valid. The owner of WithdrawRequestNFT may invalidate the request at any time and claim it for itself.

Thus, as withdrawals in YieldEthStakingEtherfi can not be canceled and there is no way to handle invalidated withdrawals, the debt from the nft will never be repaid if the owner claims the nft for itself. If the owner validates the request later, there will still be a period of unknown duration during which it’s not possible to repay the debt.

Tools Used

Vscode, Foundry

Recommended Mitigation Steps

Create a mechanism to handle invalidated withdrawals or withdrawals that have been claimed by the owner.

thorseldon (BendDAO) acknowledged and commented:

After carefully reading the WithdrawRequestNFT code, we decided that we could only contact Etherfi and manually handle this special case of InvalidRequest according to the actual situation. Only after understanding the details can we give a reasonable solution. We can trust that Etherfi will not maliciously invalidate requests.

We suggest adjust the severity level to Informative.


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

Likely the protocol assumes withdrawal requests will always remain valid and has no fallback for invalidated or owner-claimed requests.

Impact

The debt from the NFT will never be repaid if the owner claims the NFT for itself, and even if the request is later validated, there is an unknown period during which repayment is impossible.

What the attacker needed

Etherfi owner invalidates a request; Etherfi owner claims the NFT

The fix

The protocol should create a mechanism to handle invalidated withdrawals or withdrawals that have been claimed by the owner.

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 withdrawal request is like a ticket that lets you collect your money later. The owner of the ticket contract can cancel (invalidate) a ticket at any time and then take the money for themselves. If that happens, the BendDAO protocol cannot collect the money to pay back what it owes, so the debt gets stuck.

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 0x73696d616f

View all

172 more disclosed reports, best first.

More from BendDAO Invitational

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.