Skip to content

Code4rena

LoopFi

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

disclosed reports
61
most reported class
Business logic
bug classes found
4
first disclosure
2025
Find LoopFi on bugbounty.fyi Current scope, rewards and status, if it runs a public program.

Disclosed reports

Newest first. Only what LoopFi chose to make public.

Smart contracts

There is a calculation error in AuraVault::redeem()

The AuraVault redeem function passes the vault's own share amount directly to the Aura reward pool, which treats it as its own share amount. When the vault's share-to-asset ratio is not 1:1, users receive fewer assets than they are owed.

LoopFi

High
Business logic

decreaseLever uses incorrect position address when withdrawing

The decreaseLever function of the Position4626 contract withdraws collateral from the contract's own address rather than from the position passed in by the caller. Because the collateral sits in that position, the withdrawal always reverts, so decreasing leverage is impossible for Position4626 vaults.

LoopFi

High
DoS

An infinite loop in MultiFeeDistribution.sol withdraw

The withdraw function in MultiFeeDistribution.sol enters an infinite loop when a user tries to withdraw more than their unlocked balance, because a zero-amount entry in the earnings array causes the loop counter never to advance. An attacker could trigger this to block the withdraw process for affected users.

LoopFi

High
Business logic

CDPVault.liquidatePosition() does not scale takeCollateral with tokenScale ; therefore, it might send the wrong amount of collateral to the liquidator when tokenScale ! = 1 ether

The liquidation function in CDPVault transferred the internal collateral amount to the liquidator without scaling it by tokenScale, so for tokens whose scale is not one ether the liquidator received far more collateral than owed. This drained collateral belonging to other depositors, who could then no longer withdraw their funds.

LoopFi

Medium
Access control

WhenNotPaused modifier in the CDPVault can be bypassed by users

The CDPVault contract's pause mechanism can be bypassed because the public modifyCollateralAndDebt function lacks the whenNotPaused modifier, allowing users to deposit or withdraw even when the contract is paused.

LoopFi

Medium
Business logic

The debt in EligibilityDataProvider::requiredUsdValue() needs to be converted into USD; otherwise, it is not a correct value comparison

The reward eligibility check compares a USD value of locked LP tokens against a required value that is calculated by applying a ratio to a raw debt amount without first converting that debt to USD. As a result, the effective threshold is about 4.5% of total debt instead of the documented 5%, so users can qualify for rewards with less locked value than intended.

LoopFi

Medium
Business logic

Rewards may be spread out among the wrong time period due to the way the protocol calculates it

When a new reward incentive is added while a previous one is still active, the contract recalculates the reward rate by spreading leftover rewards over the new incentive's full duration, delaying and potentially reducing the original stakers' rewards. A malicious staker can then stake late and claim a portion of the delayed rewards, causing permanent loss for early stakers.

LoopFi

Medium
Business logic

Emission schedule is not followed and can cause unexpected allocation of rewards

When a new emission schedule starts, the contract updates pools using the old rewards rate for the entire period since the last update, rather than switching to the new rate at the schedule's start time. This causes rewards to be allocated incorrectly, potentially over- or under-distributing tokens.

LoopFi

Medium
Audit finding

BalancerOracle::update() can return a stale price

The BalancerOracle contract's update function sets the safe price to the current price before recalculating a new price, so when the update window has passed, it returns a stale price from the last update. An attacker could potentially exploit this stale price to manipulate the oracle's output.

LoopFi

Medium
DoS

PoolAction::updateLeverJoin wrongly updates assetsIn array, leading to PositionAction4626::_onIncreaseLever to always revert

The function PoolAction::updateLeverJoin incorrectly updates the assetsIn array when the pool token does not match any token in the assets array, causing the array to be overwritten with wrong values. This leads to a revert in PositionAction4626::_onIncreaseLever, blocking users from increasing leverage when the collateral is an ERC4626 token.

LoopFi

Medium
Business logic

INFLATION_PROTECTION_TIME can not be up to a year as intended because it is hardcoded to 1749120350

The AuraVault contract hardcodes the inflation protection deadline as a fixed timestamp rather than deriving it from deployment time, so the intended one-year Aura reward distribution window shrinks with every day that passes before deployment. If the contract is deployed late enough, the condition guarding Aura reward transfers is never true and no Aura rewards are distributed at all.

LoopFi

Medium
Business logic

PoolAction::_balancerExit returns wrong token out amount

The `_balancerExit` function returns the recipient's entire token balance instead of the amount received from the exit, causing an exaggerated return value. This can lead to reverts in `PositionAction4626::_onDecreaseLever` when the contract tries to send more tokens than it holds.

LoopFi

Medium
Business logic

PositionActionPendle.sol#_onWithdraw does not have slippage parameter minOut set

When a user withdraws collateral that is a Pendle token and asks for a different destination token, the contract exits the Pendle pool with the minimum output amount hard-coded to zero. An attacker or ordinary market movement could therefore let the user receive far fewer output tokens than expected.

LoopFi

Medium
Business logic

Discrepancy between the lastRewadTime and the lastAllPoolUpdate can allow for incorrect reward distribution to pools if registerRewardDeposit deposits less assets

The reward accounting sets the global last-update timestamp to the current block time even when individual pools were only advanced to an earlier reward end time, so the two timestamps drift apart. When a small reward deposit is registered after the end time has passed, some pools can later accrue more rewards than intended while others accrue less.

LoopFi

Medium
Smart contracts

Incorrect address is used as spender for ERC20 permit signature verification

The ERC20 permit signature verification in the transfer helper used the recipient address as the spender instead of the contract itself. This caused the permit check to fail and revert the whole increaseLever function when the recipient differed from the contract.

LoopFi

Medium
Business logic

lastRPS could be set to 0 accidentally

The reward distribution contract stores the current rewardsPerSecond in lastRPS when a distribution period ends, but if claim() is called again after the period ends, lastRPS is overwritten with zero. This prevents new reward deposits from restarting the distribution automatically, disrupting reward payouts until the owner manually resets the rate.

LoopFi

Medium