Skip to content

Code4rena

Wild Credit contest

Every publicly disclosed report for Wild Credit contest and what kind of bugs they were.

disclosed reports
12
most reported class
Business logic
bug classes found
2
first disclosure
2021
Find Wild Credit contest on bugbounty.fyi Current scope, rewards and status, if it runs a public program.

Disclosed reports

Newest first. Only what Wild Credit contest chose to make public.

Business logic

LendingPair.withdrawUniPosition should accrue debt first

The withdrawUniPosition function in LendingPair does not accrue debt before allowing a user to withdraw their Uniswap V3 position NFT, which serves as collateral. In low-activity markets, this could let an account with a de-facto negative health ratio withdraw collateral without repaying debt.

Wild Credit contest

Medium
Smart contracts

Use of deprecated Chainlink API

The contract uses Chainlink's deprecated latestAnswer() function, which could stop working if Chainlink removes support. This would prevent the protocol from obtaining prices, causing it to halt and requiring redeployment.

Wild Credit contest

Medium
Business logic

Liquidation can be escaped by depositing a Uni v3 position with 0 liquidity

A malicious user can escape liquidation by depositing a Uni v3 position with zero liquidity, because the liquidation process calls decreaseLiquidity which fails when liquidity is zero. This allows undercollateralized debt to remain unliquidated, potentially causing bad debt for the protocol.

Wild Credit contest

High
Business logic

Supply part of the accrued debt can be stolen

The `uniClaimDeposit` function mints supply shares without first accruing the total supply, allowing an attacker to mint shares and then call `accrue` to increase the share price before withdrawing. Combined with the ability to deposit a Uniswap V3 position whose liquidity has been decreased but not collected, an attacker can steal most of the accrued `lpRate` in a single transaction.

Wild Credit contest

Medium
Audit finding

_wethWithdrawTo is vulnerable re-entrancy

The function `withdrawBorrowETH` calls `_wethWithdrawTo`, which uses a low-level call to transfer ether, making it vulnerable to re-entrancy. An attacker could re-enter the contract to bypass the `MIN_RESERVE` check and potentially manipulate the reserve.

Wild Credit contest

Medium
Business logic

Reward computation is wrong

The reward distribution function in a lending protocol calculates a user's share of rewards using outdated total supply and debt values, because it distributes rewards before updating the accrual state. This can cause users to receive incorrect reward amounts, with some users getting more than their fair share and others getting less.

Wild Credit contest

High
Business logic

Total LP supply & total debt accrual is wrong

The total debt and total LP supply are not increased by the full new interest on each accrual, only by the interest of the updated user. This leads to an incorrect utilization ratio and thus wrong borrow rates, causing less debt to accrue than expected.

Wild Credit contest

Medium
Business logic

LendingPair.liquidateAccount fails if tokens are lent out

The liquidation function attempts to transfer underlying supply tokens to the liquidator, but the contract may not hold enough of those tokens if they are lent out. This prevents liquidations, potentially leading to insolvency and loss of user funds.

Wild Credit contest

High
Business logic

safeTransferFrom in TransferHelper is not safeTransferFrom

The TransferHelper contract's _safeTransferFrom function does not use the SafeERC20 library, so it fails when interacting with non-standard ERC20 tokens like USDT. An attacker could exploit this to cause deposits to revert, preventing users from depositing into pools.

Wild Credit contest

Medium