Skip to content
$1,000,000 in security audit grants are live now, Apply here →

Security review · August 2025

Fixed Staking Rewards

for Synthetix

Guardian's review of Fixed Staking Rewards for Synthetix, published August 2025. The report records 6 findings, including 1 high and 2 medium.

Published
Review window
July 24 to 28, 2025
Language
Solidity
Chains
Ethereum, Optimism, Base, Arbitrum
Sector
Perpetuals
  • 0 Critical
  • 1 High
  • 2 Medium
  • 3 Low
  • 0 Informational

3 partially resolved · 3 acknowledged

Scope

3 files in scope · 146 nSLOC
FilenSLOCLines
src/FixedStakingRewards.sol139189
src/interfaces/IChainlinkAggregator.sol35
src/interfaces/IStakingRewards.sol410

Findings 6

  1. H-01 High Order Of Reward Rate Update And Accumulation Rewards Partially resolved
    Location
    src/FixedStakingRewards.sol:59

    Description

    The current implementation, where contract first accumulates rewards and then rebalances based on SNX price, works well when the token price is falling — as users receive fewer SNX tokens for the same USD value from time A to B.

    However, this behavior backfires when SNX price appreciates. For example:

    • The rewardRate is updated when SNX is priced at $1.
    • One week later, SNX appreciates to $2.
    • A user stakes a minimal amount (dust) to trigger an accumulation update.
    • The accumulation still assumes SNX is worth $1, resulting in the user receiving double the intended USD value in SNX rewards.

    This discrepancy breaks the protocol’s intended 50% APY invariant. Worse, a malicious actor could exploit this to consistently earn more than 50% APY.

    In edge cases, if the protocol funds rewards precisely for 50% APY, this mismatch could also cause denial of service (DoS) for new stakers or claimers due to insufficient SNX.

    Recommendation

    Bias Reward Accounting in Favor of the Protocol

    To mitigate this:

    • Track the last recorded SNX price.
    • If the current price is higher, perform a rebalance first, then accumulate.
    • If the current price is lower, accumulate first, then rebalance.

    This ensures the reward distribution errs on the side of the protocol, preventing over-rewarding in volatile or upward-trending price conditions.

  2. M-01 Medium Missing Pause Functionality Logical Error Partially resolved
    Location
    `FixedStakingRewards`

    Description

    As per the documentation in the README, SNX expects FixedStakingRewards to be pausable:

    Readme:
    Pausable : Can be paused in emergency situations
    

    However, the contract inherits from a standard ERC20, not ERC20Pausable, making pause functionality unavailable.

    Recommendation

    Consider inheriting from ERC20Pausable (or the appropriate pausable base) instead of the standard ERC20, to align with the intended design and allow emergency response via pause.

  3. M-02 Medium Incorrect Reward Availability Check On Stake Logical Error Acknowledged

    Description

    The contract is expected to ensure that at least 2 weeks’ worth of rewards are available before allowing a deposit:

    Currently, the check compares requiredRewards against the full balance of the reward token:

    if (requiredRewards > rewardsToken.balanceOf(address(this))) {
    

    This includes unclaimed rewards already allocated to stakers, which can lead to false positives. For example, if some users claim rewards immediately after the stake is accepted, the contract may no longer have enough tokens for the promised 2-week coverage.

    Recommendation

    Exclude already accrued (but unclaimed) rewards from the balance check.

    Could be approximated by subtracting the yield accrued for the pre-stake total supply. (This is an approximation since the rate itself is not constant (in terms of SNX Tokens), and in the past there could have been a different rate than the current one.)

  4. L-01 Low Staking Is Permissionless Best Practices Partially resolved
    Location
    Global

    Description

    The staking contract is permissionless, anyone is able to stake. As this contract is not made public and the amount of users is expected to be very limited, it might be beneficial to think about adding a whitelist here.

    This could be handled easily when the amount of users is very limited and prevents malicious actors from interacting with the system, which decreases the risk of an exploit drastically.

    Recommendation

    Consider adding a whitelist.

  5. L-02 Low Deviation Value Can Influence Rewards Rewards Acknowledged
    Location
    Global

    Description

    The SNX chainlink price feed on Ethereum has a deviation value of 1% this could lead to the user receiving 1% too much or too less rewards.

    Recommendation

    Be aware and consider rounding up to 1% against the user.

  6. L-03 Low Stale Prices Are Accepted Oracle Acknowledged
    Location
    src/FixedStakingRewards.sol:157-159

    Description

    The SNX chainlink price feed on Ethereum has a heartbeat of 1 day but prices up to 1 day and 1 hour old are accepted. Therefore stale prices are accepted.

    Recommendation

    Consider reducing buffer from 1 hour to few minutes (10 for example)

More from Synthetix

All 14 reports
  1. Update Reviews

    34 findings2 critical · 4 high 34 findings: 2 critical, 4 high, 13 medium, 10 low, 5 informational
  2. Deposit Contract

    38 findings1 high 38 findings: 1 high, 6 medium, 20 low, 11 informational
  3. Auto-Compounding LP Vault

    80 findings1 critical · 4 high 80 findings: 1 critical, 4 high, 14 medium, 61 low
  4. SNX Vaults

    49 findings2 critical · 5 high 49 findings: 2 critical, 5 high, 13 medium, 29 low

Put your code through the same review.

This review started with a conversation about scope. Tell us what you are building and we will plan yours with you.

Get a quote