SWFT Blockchain has 1 public audit report from CertiK; dated 21 Jun 2023; 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
9 findings are still open or acknowledged in the firms’ reports: 1 high, 8 low (8 open, 1 acknowledged).
Centralization Related Risks
swft · CertiK · 21 Jun 2023 · Report ↗
Can Use Custom Errors
swft · CertiK · 21 Jun 2023 · Report ↗
Event Should Include Fee
swft · CertiK · 21 Jun 2023 · Report ↗
Inconsistent Fee Charging
swft · CertiK · 21 Jun 2023 · Report ↗
Inconsistent Use Of `to` And `mid`
swft · CertiK · 21 Jun 2023 · Report ↗
Missing/Inconsistent Checks
swft · CertiK · 21 Jun 2023 · Report ↗
Typos
swft · CertiK · 21 Jun 2023 · Report ↗
Unlocked Compiler Version
swft · CertiK · 21 Jun 2023 · Report ↗
Unnecessary Use Of SafeMath
swft · CertiK · 21 Jun 2023 · Report ↗
Newest first
| Report | Security firm | Date | Scope | Critical findings | Findings | Source |
|---|---|---|---|---|---|---|
| swft | Security firm: CertiK | Date: | Scope: Files listed | None open | Findings: 1 high · 3 medium · 17 low 12 fixed · 1 acknowledged · 8 open | skynet.certik.com ↗ |
Statuses are the security firm’s own, from each report.
| Severity | Open | Acknowledged | Fixed |
|---|---|---|---|
| Critical | 0 | 0 | 0 |
| High | 0 | 1 | 0 |
| Medium | 0 | 0 | 3 |
| Low | 8 | 0 | 9 |
From Solidity `v0.8.4`, there are more gas-efficient ways to explain to users why an operation failed than through strings. Using custom errors can significantly reduce the size of the deployed bytecode and reduce the gas cost when calls revert.
Open the reportIn the contract `AggregatorV2`, the following functions charge a `fee` specified in the order. As this `fee` can change from order to order we recommend emitting it in the functions corresponding event. - `swapTokenToToken()`; - `swapTokenToETH()`; - `swapETHToToken()`; - `swapTokenToTokenNft()`; - `swapETHToTokenNft()`.
Open the reportThe `SwapNftOrder` struct includes a `fee` which is not always charged. For tokens, a fee is charged whenever the transaction is completed on a single chain, however this is not done for NFTs. The functions `swapTokenToETHNft()`, `swapTokenToNft()`, and `swapETHToNft()` complete the transaction on a single chain, however no fee is charged.
Open the reportIn the contract `AggregatorV2`, `mid` is used when there is a swap done on the chain prior to a cross chain swap. However, the following places in the code still use `to`, when it is more consistent to use `mid`: - In the function `swapWithDex()`, `_toBalanceOrigin` is used instead of `midBalanceOrigin`; - In the function `swapToETHWithDex()`, `_toBalanceOrigin` is used instead of `midBalanceOrigin` and `_toInputAmt` is used instead of `midInputAmt`.
Open the reportThe functions `callDextoETH()` and `callDex()` do not check that `fromAmt > 0`. The functions `swapETHToToken()` and `swapETHToTokenNft()` check that the `msg.value` is greater than or equal to the `order.fromAmount` and then use the `fromAmount.sub(feeAmount)` in the call to the DEX. As the `fromAmount` is used we recommend checking that `fromAmount == msg.value`. In addition, we recommend rewriting the checks in `swapFromEthWithDex()` to be consistent along all three functions. The function `swapETHToNFT` checks that the `msg.value >= order.fromAmount`, however, the `nftBaseAmount` is used in the call to the DEX. We recommend checking that the `msg.value == order.nftBaseAmount`. In the function `swapETHToTokenNft()` it is checked that `order.fromAmount >= 0`, when `order.fromAmount` is a `uint256`. Thus this check will always pass. We recommend instead checking that it is strictly greater than 0. In the function `swapETHToNft()` it is checked that `order.fromAmount >= 0`, when `order.fromAmount` is a `uint256`. Thus this check will always pass. We recommend instead checking that it is strictly greater than 0.
Open the reportIn the contract `SwftSwap` the following typos were found: - In the function `swap()`, the error message "FROMTOKEN_CANT_T_BE_0" should be "FROM_TOKEN_CANT_BE_0". - During remediations the error message above was changed to "NOT_ENOUGH_FROM_TOKEN_TRANSFER_TO_THIS_CONCTION" where there is the typo "CONCTION". In addition we recommend having the error message reflect that the amount of tokens received did not equal the input amount. For example: "CONTRACT_DID_NOT_RECEIVE_SAME_FROM_AMOUNT_AS_INPUT". --- In the contract `AggregatorV3Router` the following typos were found: - In the comments above the function `swap()` there are unnecessary extra words, "@notice Excute transactions. transactions. The handling fee is deducted from the transferred currency." should be "@notice Excute transactions. The handling fee is deducted from the transferred currency." - In the comments above the function `swap()` there is a missing space, "@param toToken Type of target currency, such as'usdt (matic)'" should be "@param toToken Type of target currency, such as 'usdt (matic)'". - In the function `swap()`, the error message "FROMTOKEN_CANT_T_BE_0" should be "FROM_TOKEN_CANT_BE_0". - In the function `swap()`, "NOT_ENOUGH_FROM_TOKEN_TRANSFER_TO_THIS_CONCTION" has the typo "CONCTION". In addition we recommend having the error message reflect that the amount of tokens received did not equal the input amount. - In the function `cossSwap()`, "NO_FROM_TOKEN_TRANSFER_TO_THIS_CONTRACT" does not reflect that the check fails if the contract does not receive the same amount of tokens as was input. --- In the contract `AggregatorV2`: - In the function `swap()`, the error message "FROMTOKEN_CANT_T_BE_0" should be "FROM_TOKEN_CANT_BE_0". - In the function `swapFromEthWithDex()`, the error message "MSG_VALUE_MUST_EQUAL_DEPOSIT_AMMOUNT" should be "MSG_VALUE_MUST_EQUAL_DEPOSIT_AMOUNT". - The comment above the function `swapTokenToTokenNft()` should instead be above the function `swapTokenToETHNft()`. - The functions `swapWithDex()`, `swapToETHWithDex()`, `swap()`, and `swapTokenToETHNft()` where changed to not accept inflationary tokens. However, the error message was not changed to reflect that the amount of tokens received did not equal the input amount.
Open the reportThe contracts cited have an unlocked compiler version. An unlocked compiler version in the source code of the contract permits the user to compile it at or above a particular version. This, in turn, leads to differences in the generated bytecode between compilations due to differing compiler version numbers. This can lead to ambiguity when debugging, as compiler specific bugs may occur in the codebase that would be hard to identify over a span of multiple compiler versions rather than a specific one.
Open the reportThe `SafeMath` library is used unnecessarily. With Solidity compiler versions 0.8.0 or newer, arithmetic operations will automatically revert in case of integer overflow or underflow.
Open the reportThe reports name a repository or files. Open a report to see its scope.
Trustblock holds 1 public audit report for SWFT Blockchain, dated 21 Jun 2023. The latest is by CertiK (“swft”).
CertiK wrote the report Trustblock holds for SWFT Blockchain.
9 findings are still open or acknowledged in the firms’ reports: 1 high, 8 low (8 open, 1 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="swft"></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