Q2 2026 Security & Compliance Report67 incidents, $764M in losses, 88% from operational failures.
Get the report →

Audit name:

[SCA] Asymetrix | ERC20 + Oracle + Balancer | Oct2023

Date:

Oct 27, 2023

Table of Content

→Introduction
→Audit Summary
→Document Information
→System Overview
→Executive Summary
→Risks
→Findings
→Appendix 1. Severity Definitions
→Appendix 2. Scope
→Disclaimer

Want a comprehensive audit report like this?

Introduction

We express our gratitude to the Asymetrix Protocol team for the collaborative engagement that enabled the execution of this Smart Contract Security Assessment.

Asymetrix protocol is a decentralized, non-custodial protocol for asymmetric yield distribution generated from staking.

titlecontent
PlatformEthereum
LanguageSolidity
TagsERC20 token, Staking, Yielding, Uniswap, Balancer, Oracle
Timeline04/10/2023 - 26/10/2023
Methodologyhttps://hackenio.cc/sc_methodology→

    Audit Summary

    Total9.7/10
    Security Score

    9/10

    Test Coverage

    97%

    Code Quality Score

    10/10

    Documentation Quality Score

    10/10

    16Total Findings
    13Resolved
    1Accepted
    2Mitigated

    The system users should acknowledge all the risks summed up in the risks section of the report

    Document Information

    This report may contain confidential information about IT systems and the intellectual property of the Customer, as well as information about potential vulnerabilities and methods of their exploitation.

    The report can be disclosed publicly after prior consent by another Party. Any subsequent publication of this report shall be without mandatory consent.

    Document

    NameSmart Contract Code Review and Security Analysis Report for Asymetrix Protocol
    Audited ByHacken
    Websitehttps://asymetrix.io/→
    Changelog11/10/2023 – Initial Review
    21/10/2023 – Second Review
    26/10/2023 – Third Review
    • Document

      Name
      Smart Contract Code Review and Security Analysis Report for Asymetrix Protocol
      Audited By
      Hacken
      Changelog
      11/10/2023 – Initial Review
      21/10/2023 – Second Review
      26/10/2023 – Third Review

    System Overview

    Asymetrix protocol is the decentralized, non-custodial protocol for asymmetric yield distribution generated from staking. The files in the scope:

    • StakePrizePoolv2 - Pool where users deposit stEth ERC20 token. Owner adds prizes manually. Also, rewards are distributed among all the contributors.

    • OracleUniswapV3 - Contract that given a TWAP period obtains the price of a token for a given pool. The protocol uses it to obtain the ASX price in terms of ETH.

    • OracleBalancerWeighted - Contract that obtains the price of ASX in terms of ETH using the liquidity on a given balancer pool.

    • ASXPriceFeed \- Contract that returns the price of ASX by computing an average price between the uniswap and balancer oracles.

    • ValuerUniswapV3 - Contract that returns the price in USD of a uniswapv3 pool position.

    • ValuerBalancer - Contract that returns the price in USD of a balancer pool position.

    • UniswapWrapper - Contract that performs a swap on a uniswapv3 pool.

    • RewardsBooster - Contract that enables users to stake their LP positions of ASX token and boost their rewards on the stake prize pool.

    • ValidatorUniswapV3 - Contract that validates if a position is legit on a given pool of uniswap v3.

    • ValidatorBalancerWeighted - Contract that validates if a position is legit on a balancer pool.

    • ESASX - Escrowed ASX. Is a non-tradable ERC20 token, used to reward protocol contributors.

    • ESASVesting - Contract that handles the ESASX vesting tokens from users.

    Privileged roles

    • The owner of each contract can set and change multiple configuration values and also access restricted functionalities.

    • The manager/operator can access certain restricted functionalities.

    Executive Summary

    Documentation quality

    The total Documentation quality score is 10 out of 10.

    • High level overview documentation has been created.

    • Technical descriptions have been provided and NatSpec is extensive.

    Code quality

    The total Code quality score is 10 out of 10.

    • The code is structured and readable.

    • The Gas model is optimized.

    Test coverage

    Code coverage of the project is 97% (branch coverage).

    • Deployment and some basic user interactions are covered with tests.

    • The extended code coverage was done after the audit.

    Security score

    Upon auditing, the code was found to contain 0 critical, 2 high, 4 medium, and 1 low severity issues. Out of these, 6 issues have been addressed and resolved, leading to a security score of 9 out of 10.

    All identified issues are detailed in the “Findings” section of this report.

    Summary

    The comprehensive audit of the customer's smart contract yields an overall score of 9.7. This score reflects the combined evaluation of documentation, code quality, test coverage, and security aspects of the project.

    Risks

    The protocol uses illiquid pools to compute token prices. Although the exploitation may not be direct it can represent an issue for the protocol if it is not treated properly. Furthermore, using the balance of a liquidity pool as an oracle is heavily discouraged.

    Findings

    F-2023-148 Claim Rewards May Revert for Non-boosted Positions
    Status
    fixed
    Severity

    High
    F-2023-1486Counter Not Updated to User
    Status
    fixed
    Severity

    High
    F-2023-149Slippage Control Can Revert Due to Inaccurate Calculation
    Status
    fixed
    Severity

    Medium
    F-2023-149unstake and extendLock May Revert Due to Access Control Modifier
    Status
    fixed
    Severity

    Medium
    F-2023-148 Usage of Deprecated ChainLink Oracle Function
    Status
    fixed
    Severity

    Medium
    F-2023-148Price Oracle Manipulation
    Status
    accepted
    Severity

    Medium
    F-2023-149createVesting Position on Claim Transaction Can Revert
    Status
    fixed
    Severity

    Low
    I-2023-038Redeem Function Does Nothing
    Status
    fixed
    Severity

    Observation
    I-2023-038 Owner Can Renounce Itself
    Status
    mitigated
    Severity

    Observation
    I-2023-038 Centralization Risk
    Status
    mitigated
    Severity

    Observation
    Code
    ―
    Title
    Status
    Severity
    F-2023-148 Claim Rewards May Revert for Non-boosted Positions
    fixed

    High
    F-2023-1486Counter Not Updated to User
    fixed

    High
    F-2023-149Slippage Control Can Revert Due to Inaccurate Calculation
    fixed

    Medium
    F-2023-149unstake and extendLock May Revert Due to Access Control Modifier
    fixed

    Medium
    F-2023-148 Usage of Deprecated ChainLink Oracle Function
    fixed

    Medium
    F-2023-148Price Oracle Manipulation
    accepted

    Medium
    F-2023-149createVesting Position on Claim Transaction Can Revert
    fixed

    Low
    I-2023-038Redeem Function Does Nothing
    fixed

    Observation
    I-2023-038 Owner Can Renounce Itself
    mitigated

    Observation
    I-2023-038 Centralization Risk
    mitigated

    Observation
    1-10 of 16 findings

    Identify vulnerabilities in your smart contracts.

    Appendix 1. Severity Definitions

    When auditing smart contracts, Hacken is using a risk-based approach that considers Likelihood, Impact, Exploitability and Complexity metrics to evaluate findings and score severities.

    Reference on how risk scoring is done is available through the repository in our Github organization:

    Severity

    Description

    Critical
    Critical vulnerabilities are usually straightforward to exploit and can lead to the loss of user funds or contract state manipulation.

    High
    High vulnerabilities are usually harder to exploit, requiring specific conditions, or have a more limited scope, but can still lead to the loss of user funds or contract state manipulation.

    Medium
    Medium vulnerabilities are usually limited to state manipulations and, in most cases, cannot lead to asset loss. Contradictions and requirements violations. Major deviations from best practices are also in this category.

    Low
    Major deviations from best practices or major Gas inefficiency. These issues will not have a significant impact on code execution, do not affect security score but can affect code quality score.
    • Severity

      Critical

      Description

      Critical vulnerabilities are usually straightforward to exploit and can lead to the loss of user funds or contract state manipulation.

      Severity

      High

      Description

      High vulnerabilities are usually harder to exploit, requiring specific conditions, or have a more limited scope, but can still lead to the loss of user funds or contract state manipulation.

      Severity

      Medium

      Description

      Medium vulnerabilities are usually limited to state manipulations and, in most cases, cannot lead to asset loss. Contradictions and requirements violations. Major deviations from best practices are also in this category.

      Severity

      Low

      Description

      Major deviations from best practices or major Gas inefficiency. These issues will not have a significant impact on code execution, do not affect security score but can affect code quality score.

    Appendix 2. Scope

    The scope of the project includes the following smart contracts from the provided repository:

    Scope Details

    Repositoryhttps://bitbucket.ideasoft.io/projects/PBON/repos/solidity/commits/876a5a463c42c43613b49bcff313a0bcec68fe5e→
    Commit6a79c024e1c2a2b21fa8fc07b2960e1aadfa97cc
    WhitepaperN/A
    RequirementsN/A
    Technical RequirementsN/A

    Contracts in Scope

    contracts
    rewards-booster
    RewardsBooster.sol - contracts › rewards-booster › RewardsBooster.sol
    valuers
    ValuerUniswapV3.sol - contracts › rewards-booster › valuers › ValuerUniswapV3.sol
    ValuerBalancerWeighted.sol - contracts › rewards-booster › valuers › ValuerBalancerWeighted.sol
    validators
    ValidatorUniswapV3.sol - contracts › rewards-booster › validators › ValidatorUniswapV3.sol
    ValidatorBalancerWeighted.sol - contracts › rewards-booster › validators › ValidatorBalancerWeighted.sol
    oracles
    OracleUniswapV3.sol - contracts › rewards-booster › oracles › OracleUniswapV3.sol
    OracleBalancerWeighted.sol - contracts › rewards-booster › oracles › OracleBalancerWeighted.sol
    ASXPriceFeed.sol - contracts › rewards-booster › oracles › ASXPriceFeed.sol
    vesting
    UniswapWrapper.sol - contracts › vesting › UniswapWrapper.sol
    ESASXVesting.sol - contracts › vesting › ESASXVesting.sol
    core
    prize-pool
    PrizePoolV2.sol - contracts › core › prize-pool › PrizePoolV2.sol
    StakePrizePoolV2.sol - contracts › core › prize-pool › StakePrizePoolV2.sol

    Disclaimer