TrustSwap has 2 public audit reports from CertiK and Zokyo; the latest is CertiK, 27 Dec 2022; no critical findings reported.
Last updated . It holds audits and findings, contracts and incidents up to Nov 2026. Trustblock does not review code.
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).
Centralization Risks in LockNFT.sol
Trustswap #2 · CertiK · 27 Dec 2022 · Report ↗
Centralization Risks in LockToken.sol
Trustswap #2 · CertiK · 27 Dec 2022 · Report ↗
Centralization Risks in NFT.sol
Trustswap #2 · CertiK · 27 Dec 2022 · Report ↗
Centralization Risks in PriceEstimator.sol
Trustswap #2 · CertiK · 27 Dec 2022 · Report ↗
Centralized Control of Contract Upgrade
Trustswap #2 · CertiK · 27 Dec 2022 · Report ↗
Incompatibility with Deflationary Tokens
Trustswap #2 · CertiK · 27 Dec 2022 · Report ↗
Check Effect Interaction Pattern Violated
Trustswap #2 · CertiK · 27 Dec 2022 · Report ↗
Missing Emit Events
Trustswap #2 · CertiK · 27 Dec 2022 · Report ↗
Redundant Statements
Trustswap #2 · CertiK · 27 Dec 2022 · Report ↗
Solidity Version Not Recommended | Different Soli
Trustswap #2 · CertiK · 27 Dec 2022 · Report ↗
Newest first
| Report | Security firm | Date | Scope | Critical findings | Findings | Source |
|---|---|---|---|---|---|---|
| Trustswap #2 | Security firm: CertiK | Date: | Scope: Files listed | None open | Findings: 5 high · 2 medium · 16 low 10 fixed · 6 acknowledged · 7 open | skynet.certik.com ↗ |
| TrustSwap | Security firm: Zokyo | Date: | Scope: —Not recorded; see the report | None open | Findings: None listed | IPFS ↗ |
Statuses are the security firm’s own, from each report.
| Severity | Open | Acknowledged | Fixed |
|---|---|---|---|
| Critical | 0 | 0 | 0 |
| High | 0 | 5 | 0 |
| Medium | 0 | 1 | 1 |
| Low | 7 | 0 | 9 |
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 reportThere should always be events emitted in the sensitive functions that are controlled by centralization roles.
Open the reportThe linked statements do not affect the functionality of the codebase and appear to be either remnant of test code or older functionality.
Open the reportSolidity 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 reportThe 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 reportOne 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 reportThe linked functions are equivalent to the compiler-generated getter functions for the respective variables.
Open the reportThe reports name a repository or files. Open a report to see its scope.
Trustblock holds 2 public audit reports for TrustSwap, dated 10 Jun 2022 to 27 Dec 2022. The latest is by CertiK (“Trustswap #2”).
2 security firms wrote the reports Trustblock holds for TrustSwap: CertiK and Zokyo.
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.
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.
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.
<head><script src="https://widget.trustblock.run/project-widget.min.js" defer></script></head><body><divdata-tb-project-widgetdata-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