Hunt prep
Before you test LEND
What 39 disclosed reports say about LEND: what was found and paid, what was fixed, and where it may be worth looking next.
- with a public bounty
- 0
- median public bounty
- –
- highest public bounty
- –
Gaps worth testing
Not written yet for this program. The numbers below are up to date.
What was found and what it paid
Public bounties only; many reports disclose without the amount.
| Class | Reports | Paid | Median | Highest | In all |
|---|---|---|---|---|---|
| Business logic lesson | 35 | 0 | – | – | $0 |
| DoS lesson | 2 | 0 | – | – | $0 |
| Race condition lesson | 2 | 0 | – | – | $0 |
What was fixed
All reportsThe newest fixes, in our words. A fixed bug is not worth re-reporting, but a sibling feature, an older API version or a regression may be.
-
Outdated Exchange Rate Utilization
The supply function should use the current exchange rate (which accrues interest) instead of the stored one.
Disclosed
-
Transfers will fail when using USDT
Use the SafeERC20 library's safeTransfer function to handle tokens that do not return a boolean.
Disclosed
-
User may not be able to borrow even if they provide sufficient collaterals
The supply function should call enterMarkets for the supplied lToken so the collateral is recorded.
Disclosed
-
Incorrect liquidity check on destination chain
The destination chain logic should be updated to validate only that the payload.collateral covers the borrow being initiated from the source chain and previous borrows from the source chain, excluding same-chain borrows on the destination chain and other cross-chain borrows originating from the…
Disclosed
-
Incorrect maxClose Calculation in Liquidation
The calculation of maxClose should use the current debt including accrued interest instead of the historical borrow balance.
Disclosed
-
Cross chain debt accrues incorrectly
The mechanism should be changed to accrue cross-chain borrow interest using the correct borrow index.
Disclosed
-
Cross chain repayment updates wrong borrow balance
The repayment helper should skip updating the same-chain borrow balance when the repayment is not same-chain, leaving the cross-chain update to the later state-update step.
Disclosed
-
The liquidation validation logic is wrong
The check should be fixed to pass zero as the borrow amount instead of the seize amount.
Disclosed
-
User can redeem collateral immediately after initiating the borrow, leading undercollateralization
Collateral should be locked in storage when a cross-chain borrow is initiated, so it cannot be redeemed while the message is pending.
Disclosed
-
Incorrect `srcEid` check in `borrowWithInterest()`
The function should compare the borrow record's destination chain identifier against the current chain when filtering borrows on the source chain.
Disclosed
-
incorrect distribution of Lend tokens to users
The reward distribution should be called before updating the cross-chain collateral mapping.
Disclosed
-
Incorrect Debt Tracking in `_updateRepaymentState`
The length should be checked before removing the collateral entry, so the borrowed asset is removed only when the last debt is repaid.
Disclosed
-
Incorrect LEND reward distribution for cross-chain borrows
The function should aggregate borrows from crossChainCollaterals (borrows executed on this chain) and exclude crossChainBorrows.
Disclosed
-
Drainage of the LEND token reserves through repeated claims of the same rewards
The claim loop should capture the remaining amount returned by grantLendInternal() and write it back to the user's accrued balance via a new authorised update function in LendStorage.
Disclosed
-
Users will lose funds due to token decimal mismatches across chains
Decimal normalisation should be added in CrossChainRouter._handleBorrowCrossChainRequest().
Disclosed