Hunt prep
Before you test Wise Lending
What 22 disclosed reports say about Wise Lending: 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 | 16 | 0 | – | – | $0 |
| DoS lesson | 3 | 0 | – | – | $0 |
| Smart contracts lesson | 1 | 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.
-
Exploitation of the receive Function to Steal Funds
The _sendValue function should include a reentrancy check before setting sendingProgress to true, and the protocol mitigated the issue.
Disclosed
-
User can erase their position debt for free
The code should be fixed by adding a check that the token passed to `_removePositionData()` exists in the user's token array and reverting if it does not.
Disclosed
-
Incorrect bad debt accounting can lead to a state where the claimFeesBeneficial function is permanently bricked and no new incentives can be distributed, potentially locking pending and future protocol fees in the FeeManager contract
The global bad debt total should be adjusted by the difference between the position's previous and new bad debt during the liquidation check, as the report's example patch does.
Disclosed
-
Liquidators can pay less than required to completely liquidate the private collateral balance of an uncollateralized position
The fix moves the uncollateralized check earlier in the function so that only the private collateral is reduced.
Disclosed
-
Wrong use of nftID to check if a PowerFarm position is an Aave position
The code was fixed to use the keyId instead of the nftId when checking the isAave mapping.
Disclosed
-
Exiting a farm on mainnet assumes a peg of 1:1 when swapping stETH for ETH
The contract should fetch the current stETH price from a Chainlink oracle and use it to adjust the minimum output amount, and also apply it to the ethValueBefore calculation.
Disclosed
-
Chainlink Oracles may return stale prices or may be unusable when aggregator roundId is less than 50
The issue was mitigated by deriving the aggregator roundId from the proxy roundId before using it in calculations.
Disclosed
-
First depositor inflation attack in PendlePowerFarmToken
The team mitigated the issue by ensuring the admin performs the first deposit or necessary step before the farm is publicly available.
Disclosed
-
Withdrawing uncollateralized deposits is possible even though the position is in liquidation mode
The protocol mitigated the issue by removing the early return for uncollateralized deposits in checksWithdraw, so the health check uses weighted collateral.
Disclosed
-
The protocol allows borrowing small positions that can create bad debt
The protocol was mitigated by implementing a minimum borrowing amount check, according to the comment.
Disclosed
-
Off-by-one bug prevents the _compareMinMax() from detecting Chainlink aggregators’ circuit-breaking events
The comparison was changed to use greater-than-or-equal and less-than-or-equal, and the project says it mitigated the issue.
Disclosed
-
Unchecked return value bug on TransferHelper::_safeTransferFrom()
The _safeTransferFrom() should check the return value from _callOptionalReturn() and revert if it is false; the owner also mitigated it and stated that the protocol is not meant to be used with corrupted tokens.
Disclosed
-
Borrowers can DoS liquidations by repaying as little as 1 share.
The report recommends that checkMaxShares should not revert but instead return the adjusted maximum share amount, which is then used to compute the repayment amount; the team later mitigated it.
Disclosed
-
Liquidating chaining can be achieved by liquidating token collateral with the highest collateralFactor
The issue was mitigated by forcing liquidations to use the lowest collateralFactor tokens first and adding a health check after liquidation.
Disclosed
-
Lack of update when modifying pool fee
The setPoolFee function should call syncManually for the pool before changing the fee; the report notes this was mitigated in a later commit.
Disclosed