Skip to content
Business logic Audit finding Beginner

Check _to is not empty

The smart contract functions claimYield, _withdraw, and _unsponsor do not check that the recipient address _to is not the zero address. An attacker could accidentally or intentionally send funds to the zero address, causing permanent loss of assets.

pauliax Follow

Originally disclosed on Code4rena

Submitted by pauliax

functions claimYield, \_withdraw, and \_unsponsor should validate that \_to is not an empty 0x0 address to prevent accidental burns.

Recommended Mitigation Steps

Consider implementing the proposed validation: require \_to != address(0)

gabrielpoca (Sandclock) confirmed

dmvt (judge) commented:

In this case assets are at risk due to external factors. A zero address check makes sense.

The original report as published on Code4rena, by pauliax. 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 missing validation that the recipient address is not the zero address in three functions.

Impact

Assets could be permanently lost if sent to the zero address, though the report notes this is due to external factors.

What the attacker needed

None

The fix

The functions should be fixed by adding a check that the recipient address is not the zero address.

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.

In blockchain contracts, sending funds to the zero address (0x0) destroys them forever. This report says three functions let you do that by mistake because they don't check the recipient address. Adding a simple check would prevent losing money.

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 pauliax

View all

16 more disclosed reports, best first.

More from Sandclock contest

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.