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

Audit name:

[SCA] Salvor | Auction | Sep2022

Date:

Sep 27, 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 Salvor team for the collaborative engagement that enabled the execution of this Smart Contract Security Assessment.

Salvor is an auction platform for ERC721Upgradeable tokens.

titlecontent
PlatformAVM
LanguageSolidity
TagsERC721, Marketplace, Auction
Timeline06/09/2022 - 28/09/2022
Methodologyhttps://hackenio.cc/sc_methodology→

    Review Scope

    Repositoryhttps://gitlab.com/salvor1/salvor-contracts→
    Commitd397df3587c27acca8e4ef08f31e471eb5caaf15

    Audit Summary

    Total9.45/10
    Security Score

    10/10

    Test Coverage

    94.97%

    Code Quality Score

    9/10

    Documentation Quality Score

    10/10

    14Total Findings
    13Resolved
    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 Salvor
    Audited ByHacken
    Changelog16/09/2022 - Initial Review
    28/09/2022 - Second Review
    • Document

      Name
      Smart Contract Code Review and Security Analysis Report for Salvor
      Audited By
      Hacken
      Changelog
      16/09/2022 - Initial Review
      28/09/2022 - Second Review

    System Overview

    Salvor is an auction platform for ERC721Upgradeable tokens (NFTs), and it provides various auction patterns with the contracts below.

    • AuctionMarketplace - an upgradable contract that allows NFT owners to start an English auction with “buy now” price option. Current bids are open to everyone. If a user wants to bid, the amount should be higher than the previous highest one, and the rise should match the required min bid increase amount.

    • PaymentManager - an upgradable contract that manages the transfer commissions, royalties, and revenue shares for every marketplace contract. Each time the NFT owner changes, it can be expected 2 different fees:

      • Commission fee

        • A fee type that is taken from every NFT sale, if a commission percentage is set by the owner.

      • Royalty fee

        • The second fee type is only taken if the NFT contract supports single or multi royalty standard(EIP-2981). The royalty fee will be distributed to the original NFT creator/creators.

    • IPaymentManager - an interface of the PaymentManager contract.

    • DutchAuctionMarketplace - an upgradable contract that provides a Dutch auction platform. Asset owner can start an auction at a starting price, which slowly decreases over time until the reserve price is reached. Auction immediately ends when a user catches the current Dutch price.

    • LibShareHolder - a library that helps to store shareholder addresses and their percentages.

    • LibOrder - a library that helps to store the order info and hash it.

    • Marketplace - an upgradable contract that allows users to list and buy NFTs and make/accept offers to NFTs. Users can bid for any NFT asset without requiring a whitelisting process.

    • INFTCollectible - an interface of the NFTCollectible contract.

    • NFTCollectible - an ERC721 token contract that supports Royalty feature.

    • IRoyalty - an interface of the Royalty contract.

    • LibRoyalty - a library used by Royalty contract to store royalty info.

    • Royalty - a helper contract that sets royalty addresses and percentages to signal a royalty amount to be paid to the NFT creator or rights holder every time the NFT is sold or re-sold.

    Privileged roles

    • NFT owners can:

      • start an auction by choosing a type

      • settle the auction

      • cancel the auction if it has not any offer

    • Owner of the AuctionMarketplace contract can:

      • set payment manager address

      • set default bid increase percentage

      • set minimum price limit

      • set maximum duration period

      • set default auction bid period

      • pause/unpause the contract

    • Owner of the DutchAuctionMarketplace can:

      • set the payment manager address

      • pause/unpause the contract

      • set minimum price limit

      • set maximum duration

      • set minimum drop interval

    • Owner of the Marketplace contract can:

      • set the payment manager address

      • set minimum price limit

      • pause/unpause the contract

    • Owner of the NFTCollectible contract can:

      • set the base token URI

      • set the base extension

      • set the default royalties

      • update the royalties

      • mint tokens infinitely

    • Owner of the PaymentManager contract can:

      • add a marketplace address to the whitelist

      • remove a marketplace from the whitelist

      • set company wallet address

      • set commission percentage

      • pause/unpause the contract

    Executive Summary

    Documentation quality

    The total Documentation quality score is 10 out of 10.

    • Functional requirements and a technical description for each contract were provided.

    • Code explanations are well written, and the documentation is public.

    Code quality

    The total Code quality score is 9 out of 10.

    • Style guide violation was found.

    • Marketplace platforms were split into contracts, and the general architecture was well-designed.

    Test coverage

    Code coverage of the project is 94.97%.

    • Basic user interactions and setting environments were covered.

    • Negative test cases were missing.

    Security score

    Upon auditing, the code was found to contain 1 critical, 3 high, 1 medium, and 9 low severity issues. Out of these, 13 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.45. This score reflects the combined evaluation of documentation, code quality, test coverage, and security aspects of the project.

    Findings

    F-2023-0548Compilation issues
    Status
    fixed
    Severity

    Critical
    F-2023-0551 Funds lock
    Status
    fixed
    Severity

    High
    F-2023-0550Highly permissive owner access
    Status
    fixed
    Severity

    High
    F-2023-0549Highly permissive owner access
    Status
    fixed
    Severity

    High
    F-2023-0552 Requirement compliance violation / Wrong
    Status
    fixed
    Severity

    Medium
    F-2023-0561Style guide violation
    Status
    unfixed
    Severity

    Low
    F-2023-0560Boolean equality
    Status
    fixed
    Severity

    Low
    F-2023-0559Missing zero address validation
    Status
    fixed
    Severity

    Low
    F-2023-0558 Functions that can be declared as external
    Status
    fixed
    Severity

    Low
    F-2023-0557State variables' default visibility
    Status
    fixed
    Severity

    Low
    Code
    ―
    Title
    Status
    Severity
    F-2023-0548Compilation issues
    fixed

    Critical
    F-2023-0551 Funds lock
    fixed

    High
    F-2023-0550Highly permissive owner access
    fixed

    High
    F-2023-0549Highly permissive owner access
    fixed

    High
    F-2023-0552 Requirement compliance violation / Wrong
    fixed

    Medium
    F-2023-0561Style guide violation
    unfixed

    Low
    F-2023-0560Boolean equality
    fixed

    Low
    F-2023-0559Missing zero address validation
    fixed

    Low
    F-2023-0558 Functions that can be declared as external
    fixed

    Low
    F-2023-0557State variables' default visibility
    fixed

    Low
    1-10 of 14 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://gitlab.com/salvor1/salvor-contracts→
    Commitd397df3587c27acca8e4ef08f31e471eb5caaf15
    WhitepaperProvided
    RequirementsProvided→
    Technical RequirementsProvided→

    Contracts in Scope

    contracts
    AuctionMarketplace
    AuctionMarketplace.sol - contracts › AuctionMarketplace › AuctionMarketplace.sol
    DutchAuctionMarketplace
    DutchAuctionMarketplace.sol - contracts › DutchAuctionMarketplace › DutchAuctionMarketplace.sol
    ERC721Dummy.sol - contracts › ERC721Dummy.sol
    libs
    LibShareholder.sol - contracts › libs › LibShareholder.sol
    Marketplace
    lib
    LibOrder.sol - contracts › Marketplace › lib › LibOrder.sol
    Marketplace.sol - contracts › Marketplace › Marketplace.sol
    NFTCollectible
    INFTCollectible.sol - contracts › NFTCollectible › INFTCollectible.sol
    NFTCollectible.sol - contracts › NFTCollectible › NFTCollectible.sol
    PaymentManager
    IPaymentManager.sol - contracts › PaymentManager › IPaymentManager.sol
    PaymentManager.sol - contracts › PaymentManager › PaymentManager.sol
    Royalty
    IRoyalty.sol - contracts › Royalty › IRoyalty.sol
    LibRoyalty.sol - contracts › Royalty › LibRoyalty.sol
    Royalty.sol - contracts › Royalty › Royalty.sol

    Disclaimer