Skip to content

Code4rena

Wise Lending

Every publicly disclosed report for Wise Lending and what kind of bugs they were.

disclosed reports
22
most reported class
Business logic
bug classes found
3
first disclosure
2024
Find Wise Lending on bugbounty.fyi Current scope, rewards and status, if it runs a public program.

Disclosed reports

Newest first. Only what Wise Lending chose to make public.

Audit finding

Exploitation of the receive Function to Steal Funds

The WiseLending contract's reentrancy guard could be reset by sending ETH directly to the contract, allowing an attacker to re-enter functions like withdrawExactAmountETH and paybackBadDebtForToken to steal funds. An attacker could withdraw their deposit, use the reentrancy to pay off their own loan as bad debt, and profit.

Wise Lending

High
Business logic

User can erase their position debt for free

The function that removes a token from a user's borrow position does not verify that the supplied token is actually part of that position, so calling it with an unrelated token can delete the real debt entry. An attacker could thereby erase their debt and borrow further funds without repayment.

Wise Lending

High
Business logic

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

Partial liquidations of a position with bad debt increment the global bad debt counter by the full new shortfall each time, while the position's own bad debt is overwritten with only the latest figure. This leaves a permanent surplus in the global counter that cannot be paid back, so the beneficial fee claim function reverts forever and no new incentives are distributed.

Wise Lending

High
Business logic

Wrong use of nftID to check if a PowerFarm position is an Aave position

The contract uses the wrong identifier (the WiseLending NFT ID instead of the PowerFarm key ID) to check whether a position is an Aave position, causing incorrect borrow shares to be fetched. This prevents users from manually paying back Aave positions and can block liquidation of such positions.

Wise Lending

High
Business logic

Exiting a farm on mainnet assumes a peg of 1:1 when swapping stETH for ETH

The contract assumes a 1:1 peg between stETH and ETH when calculating the minimum ETH output for a Curve swap, so if stETH depegs, the swap reverts because the requested minimum exceeds what the pool can provide. An attacker could exploit this to cause legitimate users' transactions to fail, potentially disrupting operations.

Wise Lending

Medium
Business logic

First depositor inflation attack in PendlePowerFarmToken

The first depositor of a PendlePowerFarmToken can inflate the share price by donating a large amount of underlying assets, causing a subsequent depositor to receive far fewer shares than expected and lose a significant portion of their deposit when withdrawing.

Wise Lending

Medium
Business logic

The protocol allows borrowing small positions that can create bad debt

The protocol lacks a minimum borrowing amount and a minimum withdrawal amount, allowing users to create small positions that are not worth liquidating. This can leave bad debt to the protocol because liquidators have no incentive to liquidate small positions.

Wise Lending

Medium
Smart contracts

Unchecked return value bug on TransferHelper::_safeTransferFrom()

The TransferHelper::_safeTransferFrom() function ignores the boolean return value from _callOptionalReturn(), so if an ERC-20 token's transferFrom() returns false instead of reverting, the transfer failure goes undetected. An attacker could exploit this to deposit collateral or liquidate positions without actually supplying tokens.

Wise Lending

Medium
DoS

Borrowers can DoS liquidations by repaying as little as 1 share.

A borrower can front-run a liquidation by repaying a tiny amount of shares, reducing the total borrow shares so that the liquidator's specified share amount exceeds the new maximum allowed, causing the liquidation transaction to revert. This denial-of-service could increase the risk of bad debt.

Wise Lending

Medium
Business logic

Liquidating chaining can be achieved by liquidating token collateral with the highest collateralFactor

The liquidation mechanism allows a liquidator to choose which collateral token to seize, so by repeatedly liquidating the highest collateralFactor token first, the position's weighted collateral drops faster, enabling further liquidations beyond the intended 50% limit. This can result in up to 81% of the position being liquidated in the proof of concept, exceeding the protocol's intended maximum.

Wise Lending

Medium
Business logic

Lack of update when modifying pool fee

The setPoolFee function changes a pool's fee without first syncing the pool, so the next sync applies the new fee to the period before the change. This can cause the protocol or users to pay or receive incorrect fees, especially when setPoolFeeBulk changes many pools.

Wise Lending

Medium
Business logic

PendlePowerManager is incompatible with PendleRouterV3

The PendlePowerManager contract calls Pendle router functions using signatures from an older router version, but the latest PendleRouterV3 added a new parameter, causing those calls to revert. An attacker could not exploit this directly, but it prevents users from opening farm positions.

Wise Lending

Medium
DoS

Current heartbeat implementation may lead to a prolonged DoS for Chainlink Oracles

The heartbeat recalibration function sets the expected update interval to the second-largest gap between the last 50 Chainlink updates, so a period of rapid updates can make the oracle appear dead after just one minute of inactivity. An attacker can call recalibrate to disable the market that uses the oracle, causing bad debt or griefing.

Wise Lending

Medium
Business logic

A user can lose more value than he specifies in the spread when he enters a PowerFarm

A user entering a PowerFarm on Arbitrum can lose more value than the allowed spread because the deposit amount is reduced by a Uniswap swap before the final value check, causing the check to compare against a lower baseline. The user may lose up to approximately $45.24 more than intended on a $1000 deposit with a 105% spread.

Wise Lending

Medium