2024 Web3 Security ReportAccess control exploits account for nearly 80% of crypto hacks in 2024.
Discover report insights
  • Hacken
  • Audits
  • paribus
  • [SCA] Paribus / Lending / May2022
Paribus logo

Paribus

Audit name:

[SCA] Paribus / Lending / May2022

Date:

May 23, 2022

Table of Content

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

Want a comprehensive audit report like this?

Introduction

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

Paribus is a cross-chain borrowing and lending protocol for NFTs, liquidity positions, and synthetic assets, powered by the Cardano blockchain.

titlecontent
PlatformEVM
LanguageSolidity
TagsLending Platform
Timeline20/04/2022 - 24/05/2022
Methodologyhttps://hackenio.cc/sc_methodology

    Review Scope

    Repositoryhttps://github.com/Paribus/paribus-protocol
    Commitd6e83354692f6fd0e6b988ed06ae676c921d58a3

    Audit Summary

    Total9.2/10
    Security Score

    10/10

    Test Coverage

    10/10

    Code Quality Score

    7/10

    Documentation Quality Score

    5/10

    2Total Findings
    1Resolved
    0Accepted
    0Mitigated

    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 Paribus
    Audited ByHacken
    Websitehttps://paribus.io/
    Changelog09/05/2022 - Initial Review
    24/05/2022 - Second Review
    • Document

      Name
      Smart Contract Code Review and Security Analysis Report for Paribus
      Audited By
      Hacken
      Changelog
      09/05/2022 - Initial Review
      24/05/2022 - Second Review

    System Overview

    The Paribus Protocol is an Ethereum smart contract for supplying or borrowing assets. Through the pToken contracts, accounts on the blockchain supply capital (Ether or ERC-20 tokens) to receive pTokens or borrow assets from the protocol (holding other assets as collateral). The Paribus pToken contracts track these balances and algorithmically set interest rates for borrowers. The core contracts in the Paribus Protocol:

    • PToken, PErc20 and PEther — the Paribus pTokens, self-contained borrowing and lending contracts. PToken contains the core logic, and PErc20 and PEther add public interfaces for Erc20 tokens and Ether, respectively. Each PToken is assigned an interest rate and risk model, and allows accounts to mint (supply capital), redeem (withdraw capital), borrow and repay a borrow. Each PToken is an ERC-20 compliant token where balances represent ownership of the market.

    • Comptroller — the risk model contract, which validates permissible user actions and disallows actions if they do not fit certain risk parameters. For instance, the Comptroller enforces that each borrowing user must maintain a sufficient collateral balance across all pTokens.

    • Paribus (PBX) — the Paribus Governance Token.

    • InterestRateModel — contracts which define interest rate models. These models algorithmically determine interest rates based on the current utilization of a given market (that is, how much of the supplied assets are liquid versus borrowed).

    • WhitePaperInterestRateModel — initial interest rate model, as defined in the Whitepaper. This contract accepts a base rate and slope parameter in its constructor.

    Executive Summary

    Documentation quality

    The total Documentation quality score is 5 out of 10.

    • Customer provided superficial functional and technical requirements.

    Code quality

    The total Code quality score is 7 out of 10.

    • Commented code.

    • TODO comments.

    • Unit tests were provided.

    Architecture quality

    The architecture quality score is 10 out of 10.

    • Follows best practices.

    Security score

    Upon auditing, the code was found to contain 0 critical, 0 high, 2 medium, and 0 low severity issues. Out of these, 1 issues have been addressed and resolved, leading to a Security score of 10 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.2. This score reflects the combined evaluation of documentation, code quality, test coverage, and security aspects of the project.

    Findings

    Code
    Title
    Status
    Severity
    F-2022-1878The code does not consider all cases
    fixed

    Medium
    F-2022-1877Unfinished code
    unfixed

    Medium
    1-2 of 2 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://github.com/Paribus/paribus-protocol
    Commitd6e83354692f6fd0e6b988ed06ae676c921d58a3
    WhitepaperNot provided
    RequirementsPartially provided
    Technical RequirementsProvided

    Contracts in Scope

    contracts
    CompoundLens.sol - contracts/CompoundLens.sol
    Comptroller.sol - contracts/Comptroller.sol
    ComptrollerStorage.sol - contracts/ComptrollerStorage.sol
    ErrorReporter.sol - contracts/ErrorReporter.sol
    Governance
    PBXToken.sol - contracts/Governance/PBXToken.sol
    InterestRateModels
    BaseJumpRateModelV2.sol - contracts/InterestRateModels/BaseJumpRateModelV2.sol
    DAIInterestRateModelV3.sol - contracts/InterestRateModels/DAIInterestRateModelV3.sol
    InterestRateModel.sol - contracts/InterestRateModels/InterestRateModel.sol
    JumpRateModel.sol - contracts/InterestRateModels/JumpRateModel.sol
    JumpRateModelV2.sol - contracts/InterestRateModels/JumpRateModelV2.sol
    LegacyInterestRateModel.sol - contracts/InterestRateModels/LegacyInterestRateModel.sol
    LegacyJumpRateModelV2.sol - contracts/InterestRateModels/LegacyJumpRateModelV2.sol
    WhitePaperInterestRateModel.sol - contracts/InterestRateModels/WhitePaperInterestRateModel.sol
    Interfaces
    ComptrollerInterface.sol - contracts/Interfaces/ComptrollerInterface.sol
    EIP20Interface.sol - contracts/Interfaces/EIP20Interface.sol
    EIP20NonStandardInterface.sol - contracts/Interfaces/EIP20NonStandardInterface.sol
    IUniswapV2Factory.sol - contracts/Interfaces/IUniswapV2Factory.sol
    IUniswapV2Router.sol - contracts/Interfaces/IUniswapV2Router.sol

    Disclaimer