Skip to content
Business logic Audit finding Intermediate

Lend method signature for illuminate does not track the accumulated fee

The Lend method in Illuminate's lending contract does not add the calculated fee into the accumulated fees mapping, so fees are not tracked for the admin to withdraw. An attacker or user could cause fees to be stuck, forcing the admin to wait at least three days and use the normal withdraw path instead of the fee withdrawal function.

Kumpa Follow

Originally disclosed on Code4rena

Submitted by Kumpa, also found by cccz, cryptphi, hansfriese, jah, kenzo, kirk-baird, Metatron, pashov, and poirots

Normally the amount of fees after calculateFee should be added into fees[u] so that the admin could withdraw it through withdrawFee. However, illuminate ledning does not track fees[u]. Therefore, the only way to get fees back is through withdraw which admin needs to wait at least 3 days before receiving the fees.

Recommended Mitigation Steps

Add the amount of fee after each transaction into fees[u] like other lending method. for example: fees[u] += calculateFee(a);

sourabhmarathe (Illuminate) confirmed


The original report as published on Code4rena, by Kumpa. 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 Lend function omits the line that adds the calculated fee to the fees mapping, unlike the other lending methods.

Impact

Fees from the Lend method are not tracked for the admin, so they can only be recovered through withdraw after waiting at least three days.

What the attacker needed

None

The fix

The Lend method should add the calculated fee to the fees mapping after each transaction, as the other lending methods do.

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 keeps a running total of fees that the administrator can collect later. In one function that total was never updated, so the fees were not recorded where the admin expects them. The money is not lost, but it can only be taken out through the slower normal withdrawal, which has a waiting period.

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 Kumpa

View all

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