Skip to content
Business logic Audit finding Intermediate

Redeemer.redeem() for Element withdraws PT to wrong address.

The Redeemer contract's redeem function for Element sends withdrawn principal tokens to the marketplace address instead of the Redeemer contract, causing a loss of PT. An attacker could exploit this to make the contract lose funds.

auditor0517 Follow

Originally disclosed on Code4rena

Submitted by auditor0517, also found by 0x52, cccz, datapunk, kenzo, and pashov

Redeemer.redeem() for Element withdraws PT to wrong address.

This might cause a result of loss of PT.

Proof of Concept

According to the ReadMe.md, Redeemer should transfer external principal tokens from Lender.sol to Redeemer.sol.

But it transfers to the “marketPlace” and it would lose the PT.

Recommended Mitigation Steps

Modify IElementToken(principal).withdrawPrincipal(amount, marketPlace); like this.

IElementToken(principal).withdrawPrincipal(amount, address(this));

sourabhmarathe (Illuminate) confirmed


The original report as published on Code4rena, by auditor0517. 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 redeem function passes the wrong recipient address (marketPlace) to withdrawPrincipal instead of address(this).

Impact

This could cause a loss of principal tokens (PT) for the Redeemer contract.

What the attacker needed

None

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 function is supposed to move tokens to itself but instead sends them to a different address. This means the tokens are lost to the intended recipient. An attacker could trigger this to cause loss of funds.

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 auditor0517

View all

11 more disclosed reports, best first.

More from Illuminate 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.