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