TrustSwap audit reports

Avalanche, BNB Chain, Ethereum, Polygon (POS)trustswap.orgGitHub

TrustSwap has 2 public audit reports from CertiK and Zokyo; the latest is CertiK, 27 Dec 2022; no critical findings reported.

Critical findings
No open critical findings
Across 2 reports.
Open the latest report
Your label, live
Get the label for your site

Last updated . It holds audits and findings, contracts and incidents up to Nov 2026. Trustblock does not review code.

Open findings across every firm13

Statuses are the security firms’ own

13 findings are still open or acknowledged in the firms’ reports: 5 high, 1 medium, 7 low (7 open, 6 acknowledged).

High
5
Medium
1
Low
7
  • High Acknowledged

    Centralization Risks in LockNFT.sol

    Trustswap #2 · CertiK · 27 Dec 2022 · Report ↗

  • High Acknowledged

    Centralization Risks in LockToken.sol

    Trustswap #2 · CertiK · 27 Dec 2022 · Report ↗

  • High Acknowledged

    Centralization Risks in NFT.sol

    Trustswap #2 · CertiK · 27 Dec 2022 · Report ↗

  • High Acknowledged

    Centralization Risks in PriceEstimator.sol

    Trustswap #2 · CertiK · 27 Dec 2022 · Report ↗

  • High Acknowledged

    Centralized Control of Contract Upgrade

    Trustswap #2 · CertiK · 27 Dec 2022 · Report ↗

  • Medium Acknowledged

    Incompatibility with Deflationary Tokens

    Trustswap #2 · CertiK · 27 Dec 2022 · Report ↗

  • Low Open

    Check Effect Interaction Pattern Violated

    Trustswap #2 · CertiK · 27 Dec 2022 · Report ↗

  • Low Open

    Missing Emit Events

    Trustswap #2 · CertiK · 27 Dec 2022 · Report ↗

  • Low Open

    Redundant Statements

    Trustswap #2 · CertiK · 27 Dec 2022 · Report ↗

  • Low Open

    Solidity Version Not Recommended | Different Soli

    Trustswap #2 · CertiK · 27 Dec 2022 · Report ↗

All 13 open and acknowledged findings

Audits2

Newest first

ReportSecurity firmDateScopeCritical findingsFindingsSource
Trustswap #2Security firm: CertiKDate: Scope: Files listedNone openFindings: 5 high · 2 medium · 16 low
10 fixed · 6 acknowledged · 7 open
skynet.certik.com ↗
TrustSwapSecurity firm: ZokyoDate: Scope: Not recorded; see the reportNone openFindings: None listedIPFS ↗

Findings23

Statuses are the security firm’s own, from each report.

SeverityOpenAcknowledgedFixed
Critical000
High050
Medium011
Low709
LowCheck Effect Interaction Pattern ViolatedTrustswap #2 · CertiK · 27 Dec 2022Open

A reentrancy attack can occur when the contract creates a function that makes an external call to another untrusted contract before resolving any effects. If the attacker can control the untrusted contract, they can make a recursive call back to the original function, repeating interactions that would have otherwise not run after the external call resolved the effects. *This finding is considered minor because the reentrancy only causes out-of-order events or because the state variable is only incremented or decremented. So, the effect of out-of-order increments may be unobservable after the transaction. However, the reentrancy vulnerability may still cause other issues in the middle of a transaction.* ----- Although in `LockToken` many functions are using the `ReentrancyGuard` modifier, some functions changing state variables are not using it. Moreover, the function `setNotEntered()` can be used to deactivate this modifier and reenter the functions supposedly protected.

Open the report
LowMissing Emit EventsTrustswap #2 · CertiK · 27 Dec 2022Open

There should always be events emitted in the sensitive functions that are controlled by centralization roles.

Open the report
LowRedundant StatementsTrustswap #2 · CertiK · 27 Dec 2022Open

The linked statements do not affect the functionality of the codebase and appear to be either remnant of test code or older functionality.

Open the report
LowSolidity Version Not Recommended | Different SoliTrustswap #2 · CertiK · 27 Dec 2022Open

Solidity frequently releases new compiler versions. Using an old version prevents access to new Solidity security features. ```solidity=1 pragma solidity 0.6.2; ``` ```solidity=1 pragma solidity ^0.6.0; ``` are not recommended for deployment ----- Multiple Solidity versions are used in the codebase. Versions used: `^0.6.2`, `^0.6.0`, `>=0.4.24<0.7.0`, `0.8.9`

Open the report
LowThird Party DependencyTrustswap #2 · CertiK · 27 Dec 2022Open

The contract is serving as the underlying entity to interact with one or more third-party protocols. The scope of the audit treats third-party entities as black boxes and assumes their functional correctness. However, in the real world, third parties can be compromised and this may lead to lost or stolen assets. In addition, upgrades of third parties can possibly create severe impacts, such as increasing fees of third parties, migrating to new LP pools, etc. --- ```solidity=48 address public usdTokenAddress; ``` - The contract `LockToken` interacts with third party contract with `IERC20Extended` interface via `usdTokenAddress`. --- ```solidity=136 address _tokenAddress, ``` - The function `LockToken.lockToken` interacts with third party contract with `IERC20` interface via `_tokenAddress`. --- ```solidity=174 address _tokenAddress, ``` - The function `LockToken.lockNFT` interacts with third party contract with `IERC721` interface via `_tokenAddress`. --- ```solidity=12 (address tokenAddress, ,uint256 tokenAmount, uint256 unlockTime, , uint256 nftTokenId, bool isNFT , ,) = lockToken.getDepositDetails(tokenId); ``` - The function `NFTDescriptor.tokenURI` interacts with third party contract with `IERC20Extended` interface via `tokenAddress`. --- ```solidity=11 IUniswapV2Router02 internal uniswapRouter; ``` - The contract `PriceEstimator` interacts with third party contract with `IUniswapV2Router02` interface via `uniswapRouter`.

Open the report
LowUnprotected InitializerTrustswap #2 · CertiK · 27 Dec 2022Open

One or more logic contracts do not protect their initializers. An attacker can call the initializer and assume ownership of the logic contract, whereby she can perform privileged operations that trick unsuspecting users into believing that she is the owner of the upgradeable contract. ```solidity=10 contract LockNFT is Initializable, OwnableUpgradeable, ERC721Upgradeable{ ``` - `LockNFT` is an upgradeable contract that does not protect its initializer. ```solidity=21 function initialize(string calldata _name, string calldata _symbol, address _lockTokenAddress, address _descriptorAddress) ``` - `initialize` is an unprotected initializer function. --- ```solidity=15 contract LockToken is Initializable, OwnableUpgradeSafe, PausableUpgradeSafe, IERC721Receiver { ``` - `LockToken` is an upgradeable contract that does not protect its initializer. ```solidity=108 function initialize() ``` - `initialize` is an unprotected initializer function. --- ```solidity=8 contract NFT is Initializable, ERC721UpgradeSafe, OwnableUpgradeSafe{ ``` - `NFT` is an upgradeable contract that does not protect its initializer. ```solidity=9 function initialize(string calldata _name, string calldata _symbol) ``` - `initialize` is an unprotected initializer function. --- ```solidity=9 contract NFTDescriptor is Initializable{ ``` - `NFTDescriptor` is an upgradeable contract that does not protect its initializer. ```solidity=10 function initialize() external{} ``` - `initialize` is an unprotected initializer function. --- ```solidity=8 contract PriceEstimator is IPriceEstimator, Initializable, OwnableUpgradeSafe { ``` - `PriceEstimator` is an upgradeable contract that does not protect its initializer. ```solidity=19 function initialize(address uniswapRouterAddress) ``` - `initialize` is an unprotected initializer function.

Open the report
LowUser-Defined GettersTrustswap #2 · CertiK · 27 Dec 2022Open

The linked functions are equivalent to the compiler-generated getter functions for the respective variables.

Open the report

Contracts

No deployed address is recorded for these audits.

The reports name a repository or files. Open a report to see its scope.

The repositories and files the reports name

TrustSwap: questions

Is TrustSwap audited?

Trustblock holds 2 public audit reports for TrustSwap, dated 10 Jun 2022 to 27 Dec 2022. The latest is by CertiK (“Trustswap #2”).

Who audited TrustSwap?

2 security firms wrote the reports Trustblock holds for TrustSwap: CertiK and Zokyo.

Are there open findings in TrustSwap’s audits?

13 findings are still open or acknowledged in the firms’ reports: 5 high, 1 medium, 7 low (7 open, 6 acknowledged). No critical finding is reported. Statuses are the security firms’ own.

Show this on your site

Is this your project? Show this record on your own website. The label states what the record holds, links to this page and updates by itself. It is free and needs no sign-in.

Content

Facts

Automatic: the three strongest facts of this project’s own record (its last audit and two more), highlighted. They update with the record. Picking a fact turns Automatic off.

Fixed as
Language

Style

Layout
Theme
Accent
Corners

Format

Size
Date
Embed as
HTML
<head>
<script src="https://widget.trustblock.run/project-widget.min.js" defer></script>
</head>
<body>
<div
data-tb-project-widget
data-tb-project-slug="trustswap"
></div>
</body>

Paste the code where the label should appear. It uses no API credit and updates by itself.

Something wrong on this page? A missing report, a wrong date, a finding that was fixed since. Tell us and we check it against its source.

Tell us