Skip to content

Code4rena

Reserve Core

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

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

Disclosed reports

Newest first. Only what Reserve Core chose to make public.

Business logic

The default Governor Anastasius is unable to call resetStakes

The default Governance contract cannot call resetStakes because the function increments the era, causing the startedInSameEra check to fail and revert the execution. This makes an emergency governance action unavailable when stake rates become unsafe.

Reserve Core

Medium
Business logic

Users can dodge losses due to StRSR era changes with instant operations

The StRSR contract resets stakeRate and draftRate independently when they exceed maximum values, causing losses for some holders. An attacker can sandwich the rate reset with unstake and cancelUnstake calls to avoid losses and gain a share of RSR left in the contract.

Reserve Core

Medium
Business logic

The time available for a canceled withdrawal should not impact future unstaking processes

A cancelled withdrawal request remains in the queue and its old availability time is used as a floor for later withdrawal requests, so after the owner reduces the unstaking delay, a user who cancels and unstakes again still has to wait the old, longer delay. This can lock a user's funds for the original delay period even though the delay was shortened.

Reserve Core

Medium
Business logic

RToken can manipulate distribution to avoid paying DAO fees

Governance of an RToken can manipulate the distribution settings so that RSR revenue accumulates in the rsrTrader and is later redistributed with a different ratio, reducing the DAO fee paid from 10% to about 1%. This allows the RToken to avoid paying most of the DAO fee.

Reserve Core

Medium
DoS

Broken assumptions can lead to the inability to seize RSR

A broken invariant in the staking contract allows a staker to make totalStakes zero while stakeRSR remains non-zero, causing a division by zero when seizeRSR is called. An attacker can front-run a seize transaction to prevent the protocol from seizing RSR, potentially disrupting a necessary rebalance.

Reserve Core

Medium
Business logic

The tradeEnd in BackingManager isn’t updating correctly

The tradeEnd value for Dutch auctions is set to the auction's end time, which can be up to a week, and is not updated when the auction settles early. This can prevent new Dutch auctions from being created for up to a week, even after the basket becomes ready.

Reserve Core

Medium
Business logic

cancelUnstake lack payoutRewards before mint shares

The cancelUnstake function mints new stRSR shares at the current exchange rate without first calling payoutRewards, so the rate is stale and lower than it should be. An attacker who cancels their unstake can therefore receive more RSR than they are entitled to, at the expense of other stakers.

Reserve Core

Medium
Business logic

_claimRewardsOnBehalf() User’s rewards may be lost

The reward-claiming function caps the payout at the contract's current token balance and then zeroes the user's unclaimed rewards, even when the shortfall is only because rewards still sit in the external incentives controller. A user calling the claim with the update flag off can therefore receive less than owed and have the remainder erased.

Reserve Core

Medium
Business logic

An oracle deprecation might lead the protocol to sell assets for a low price

A deprecated Chainlink oracle causes calls to revert with empty error data, which the protocol misinterprets as an out-of-gas error, blocking bids during a Dutch auction. This can let a bidder buy assets at a price below market value once the oracle is updated.

Reserve Core

Medium
Business logic

Lack of protection when withdrawing Static Atoken

The StaticATokenLM withdrawal function lacks slippage protection, so users withdrawing at different times may receive different amounts of AToken for the same Static Atoken due to a non-linear exchange rate. An attacker could time withdrawals to exploit rate fluctuations, though the impact is limited to timing differences.

Reserve Core

Medium
Business logic

Potential Loss of Rewards During Token Transfers in StaticATokenLM.sol

The token transfer function updates user rewards without first refreshing the global reward index from the incentives controller, so the sender may lose pending rewards. An attacker could exploit this by transferring tokens to cause the sender to forfeit rewards, though the impact is limited to reward accounting.

Reserve Core

Medium
Audit finding

CTokenV3Collateral._underlyingRefPerTok should use the decimals from underlying Comet

The function _underlyingRefPerTok used the decimals of the wrapper token instead of the underlying Comet token when converting the exchange rate, leading to an incorrect reference price. This could cause the collateral's value to be miscomputed, potentially affecting the protocol's accounting.

Reserve Core

Medium
Race condition

Curve Read-only Reentrancy can increase the price of some CurveStableCollateral

The price of a CurveStableCollateral LP token can be manipulated during a Curve pool's remove_liquidity call because the pool burns LP tokens before transferring out the underlying assets, and the collateral's price calculation uses the reduced LP supply while other assets remain in the pool. An attacker could exploit this to make the collateral appear more valuable than it is.

Reserve Core

Medium
Business logic

Sell reward rTokens at low price because of skiping furnace.melt

The RevenueTrader's manageToken function only refreshes the asset registry and melts the furnace if the registry hasn't been refreshed in the same block. An attacker can call assetRegistry.refresh() first, so the furnace.melt() is skipped, leaving the RToken's basket unit exchange rate lower than actual and causing reward rTokens to be sold at a lower price.

Reserve Core

Medium
Business logic

The Asset.lotPrice doubles the oracle timeout in the worst case

The Asset.lotPrice function uses a saved price timestamp that can be up to one oracle timeout old, so when the oracle fails, the price decay starts up to twice the oracle timeout after the last real price update. This can cause the protocol to use an outdated price for longer than intended, potentially affecting trades or rebalancing.

Reserve Core

Medium
DoS

Permanent funds lock in StargateRewardableWrapper

The StargateRewardableWrapper calls the Stargate staking contract's deposit function during every deposit, withdraw, or transfer, which in turn calls updatePool. If the Stargate admin sets totalAllocPoint to zero, updatePool reverts due to division by zero, causing all such operations to fail and locking user funds in the wrapper.

Reserve Core

Medium
Smart contracts

RTokenAsset price estimation accounts for margin of error twice

The RTokenAsset price estimation applies the oracle margin of error twice, once when estimating the basket range and again when multiplying by the basket unit price, widening the price range more than necessary. This could cause the asset to be sold for less than its value or prevent sales if the low price falls below the minimum trade volume.

Reserve Core

Medium
Business logic

Lack of protection when caling CusdcV3Wrapper._withdraw

The withdrawal function in the CusdcV3Wrapper contract lacks slippage protection, so users unwrapping wComet to comet may receive a different amount than expected because the exchange rate changes over time. An attacker could exploit this by timing withdrawals to their advantage, though the report does not specify a concrete attack.

Reserve Core

Medium
Business logic

Asset.lotPrice only uses oracleTimeout to determine if the price is stale.

The Asset.lotPrice function uses a single oracleTimeout value to decide whether a saved price is still valid, but some collateral types combine multiple price feeds with different timeouts. If a feed with a shorter timeout fails, lotPrice may return a stale saved price instead of recognising the price as invalid.

Reserve Core

Medium
Business logic

CBEthCollateral and AnkrStakedEthCollateral _underlyingRefPerTok is incorrect

The collateral plugins for cbETH and ankrETH used an exchange rate that converts to staked ETH2 rather than ETH, so the reported reference-per-token rate was too high. An attacker could exploit this to issue more rtokens than the collateral should allow, especially when the unstaking premium widened.

Reserve Core

High
Business logic

ConvexStakingWrapper.sol after shutdown,rewards can be stolen

After the contract is shut down, reward checkpoints stop updating, so a new user who receives tokens has a zero reward integral and can claim rewards they never earned. By transferring tokens to fresh addresses and claiming repeatedly, an attacker could drain all remaining rewards.

Reserve Core

High
Audit finding

Possible rounding during the reward calculation

The reward calculation in a staking contract rounds down when converting reward amounts to per-share values, causing a loss of rewards that become locked in the contract. An attacker could exploit this by triggering frequent reward claims, potentially causing users to lose up to 50% of their rewards.

Reserve Core

Medium