Checking yieldBearingToken against u instead of backingToken
The lend function for Tempus checks the yield-bearing token instead of the backing token, so it fails with the correct market. An attacker could not exploit this to steal funds, but it prevents legitimate lending.
Submitted by datapunk
The lend function for tempus will fail with the right market.
Proof of Concept
Checks if (ITempus(principal).yieldBearingToken() != IERC20Metadata(u)), while it should check ITempus(principal).backingToken()
Recommendation
Do this instead:
if (ITempus(principal).backingToken() != IERC20Metadata(u))
sourabhmarathe (Illuminate) confirmed, but disagreed with severity
I think should probably be medium severity as user funds not at risk.
gzeoneth (judge) decreased severity to Medium
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 developer used the wrong token getter (yieldBearingToken instead of backingToken) in a comparison.
Impact
The lend function fails for the correct market, but user funds are not at risk.
What the attacker needed
None
The fix
The comparison should use backingToken() instead of yieldBearingToken().
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.
This is a smart contract bug where a function compares the wrong token. The code checks for a token that represents yield, but it should check the token that actually backs the loan. As a result, the function does not work when it should, but no money is lost.
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.