TON audit and security record

BNB Chainton.orgXGitHub

TON has 6 public audit reports from CertiK and Trail of Bits; the latest is Trail of Bits, 25 Mar 2024. 77 findings in 7 reports: 50 fixed, 1 acknowledged, 22 open, 4 informational.

Open the latest report

Your label, liveGet it for your site

Trustblock: Last audit Mar 2024. Trail of Bits. 6 reports, 2 firms. 50 of 73 findings fixedLast audit Mar 2024 · Trail of Bits6 reports, 2 firms · 50 of 73 findings fixed

Updated · Trustblock does not review code.

Skip to the sections

The record over time

Bar height: findings in the report · Select a mark to open it

Audit reports 6
Incidents 0
None on record
01 · Reviews

Who audited TON?

6reports from 2 firms, Aug 2022 to Mar 2024
77 findings, by severity
Critical
0
High
6
Medium
13
Low
54
Informational
4
Fixed 50Acknowledged 1Open 22Statuses are each firm’s own.
HighAcknowledgedMalicious orders can approve existing orders on behalf of any signerTON Foundation Multisignature Wallet · Trail of Bits · 25 Mar 2024

Team states it fixed this in fd34ee5; not verified in this report.

Report ↗
HighOpenMalicious orders can create and execute new ordersTON Foundation Multisignature Wallet · Trail of Bits · 25 Mar 2024

The report gives no description here.

Report ↗
HighOpenAll the money locked in bridge can be extracted vTON-EVM Bridge · CertiK · 19 Jan 2023

TON contract `bridge_code` can `execute_voting()` received from the Bridge Governance (`multisig-code` owned by a set of oracles). According to the [ETH-TON bridge description](https://github.com/ton-blockchain/TIPs/issues/24#issuecomment-899768466), each oracle puts a significant amount of TON coins (stake) on the governing smart contract (`multisig-code`). The initial stake is 100k TON coins per oracle. Solidity contract `Bridge` can mint TONCOINs via `voteForMinting()`. In case of oracles collusion: 1. They can mint unlimited amount of ERC20 TONCOINs and sell them on DEX/CEX. The profit depends on the available liquidity and order book. 2. They can extract all the locked TONs from `bridge_code` via common "swap" operation. Reasonable if locked amount is bigger than the total stake. At the moment of writing total stake is 900k TONs, `total_locked` is 11M TONs. At the same time 1. The Bridge Governance can't be reassigned to another contract by Validators because that will automatically "unlock" the stakes. 2. Oracles set on ETH side can't be updated because it requires the signatures of old Bridge Governance participants. 3. If stakes unlocked, the oracles majority can steal minority's stakes. So, "out-of-control" Bridge can't be shut down. New Bridge has to be deployed and will work in parallel. The Bridge assumes that the majority of oracles follow the rules, despite the fact they are incentivized to do not. **Each oracle has to be trusted**, otherwise the malicious actor can stake from many accounts to get the majority.

Report ↗
HighOpenCentralization Related RisksTON Stablecoin · CertiK · 7 Dec 2022

The owner of `admin_address` is allowed to: * `op::mint` any amount of jettons to any wallet * `op::change_admin` to any other one * lock any wallet (prevent funds transferring) * transfer funds from any wallet to any other one or burn them * invalidate all the wallets, invalidate `total_supply` and other data * rename Jetton, change description or `decimals`

Report ↗
MediumOpenLack of `block.chainid` in signed data can lead tTON-EVM Bridge · CertiK · 19 Jan 2023

The message signed by oracles in one chain (Ethereum mainnet, BSC mainnet, Ethereum testnet, etc.) can be replayed by the attacker in another one, if the Bridge address is the same and oracle keys are the same. The replay attack can also be executed in case of chain fork (like Ethereum/Ethereum Classic).

Report ↗
Show all 23 ↓
MediumOpenOracles threshold is rounded downTON-EVM Bridge · CertiK · 19 Jan 2023

```solidity=19 require(signatures.length >= 2 * oraclesSet.length / 3, "Not enough signatures"); ``` The check is expected to pass if at least 2/3 or signatures were obtained. However, due to rounding down it can pass with less. For example, with 4 oracles only 2 signatures required.

Report ↗
LowOpen`active_flag` is stored in different waysTON-EVM Bridge · CertiK · 19 Jan 2023

`pending_queries` element has the one bit flag at the beginning. If it is set to 0, the query was already "executed". Otherwise the flag is 1 and other fields are packed in the structure. In `update_pending_queries()` this flag is saved with `store_uint()` and `store_int()`. In `message_signed_by_id?()`, `messages_by_mask()` and `unpack_query_data()` it is loaded by `load_int()`.

Report ↗
LowOpen`end_parse()` Is MissingTON-EVM Bridge · CertiK · 19 Jan 2023

`end_parse()` checks if slice is empty, otherwise throws an exception. It allows to ensure the slice has the expected data structure.

Report ↗
LowOpen`get_messages_unsigned_by_id()` name is misleadinTON-EVM Bridge · CertiK · 19 Jan 2023

According to the name the function `get_messages_unsigned_by_id()` should return the messages that are yet unsigned by the owner with `id`. However, the function returns the messages that were signed by that owner. `get_messages_unsigned()` returns all the messages not yet "executed".

Report ↗
LowOpen`load_text_hex_number()` should check the input dTON-EVM Bridge · CertiK · 19 Jan 2023

`load_text_hex_number()` doesn't perform some safety checks: 1. It is not checked that `comment.slice_bits()` is divisible by 8 (extra bits are ignored). 2. It is not checked that the result fits into `int` (overflow exception is thrown). 3. It is not checked that `comment` has enough data (underflow exception is thrown).

Report ↗
LowOpen`require()` can be usedTON-EVM Bridge · CertiK · 19 Jan 2023

The expression `if (!condition) revert(message)` can be rewritten in more common form `require(condition, message)`.

Report ↗
LowOpenDeclaration Naming ConventionTON-EVM Bridge · CertiK · 19 Jan 2023

Some function names do not conform to the [Solidity style guide](https://solidity.readthedocs.io/en/v0.7.3/style-guide.html#naming-conventions) with regards to its naming convention.

Report ↗
LowOpenEthereum bridge `config_param(71)` is hardcodedTON-EVM Bridge · CertiK · 19 Jan 2023

`config_param(71)` stands for Ethereum mainnet bridge. To deploy the bridge for another chain one has to edit the code. This can lead to a confusion. Also, `multisig-code` and `bridge_code` use independent code to access the `config_param` which increases the code complexity.

Report ↗
LowOpenFunction Should Be Declared ExternalTON-EVM Bridge · CertiK · 19 Jan 2023

`public` functions which are never called internally within the contract should have `external` visibility for gas optimization. Unchanged `memory` arguments of `external` functions should be declared `calldata`.

Report ↗
LowOpenImproper Usage of `impure` ModifierTON-EVM Bridge · CertiK · 19 Jan 2023

The function `get_bridge_config()` is defined as `impure`, but it does not modify the storage or throw an exception.

Report ↗
LowOpenMissing event emittingTON-EVM Bridge · CertiK · 19 Jan 2023

`allowBurn` field is changed by `voteForSwitchBurn()` but no event is emitted.

Report ↗
LowOpenThe code can be simplifiedTON-EVM Bridge · CertiK · 19 Jan 2023

```cpp=15 throw_if(301, wc + 1); ``` The code can be rewritten in a more explicit way: ```cpp=15 throw_unless(301, wc == - 1); ``` ```cpp=67 int should_check = cnt_bits != old_cnt_bits; cnt -= should_check; ``` The code can be rewritten in a more explicit way: ```cpp=67 if (cnt_bits != old_cnt_bits) { cnt += 1; } ``` ```cpp=167 last_cleaned -= last_cleaned == 0; ``` The code can be rewritten in a more explicit way: ```cpp=167 if (last_cleaned == 0) { last_cleaned = 1; } ```

Report ↗
LowOpenUsage of Magic NumbersTON-EVM Bridge · CertiK · 19 Jan 2023

There are many magic numbers used directly in code.

Report ↗
LowOpen`losses` is not updated if there are no votes inTON Masterchain Contracts Formal Verification · CertiK · 14 Sep 2022

The voting configuration includes the parameters `min_wins` and `max_losses`, which are used to initialize new proposals. As we prove in this report, a proposal needs to win at least `min_wins` times in order to pass. If it loses more than `max_losses` times, it may be discarded. However, the latter is not a hard guarantee. The check for losses happens either when somebody votes for the proposal, or if the proposal is selected by the `scan_random_proposal()` function. If nobody voted on it for a long period of time, where the validator set changed multiple times and the proposal did not happen to be scanned, then the fact that it did not win in that period would not get recorded, so the loss count would be smaller and it could still pass.

Report ↗
LowOpen`uint` values are stored as `int`TON Vesting · CertiK · 5 Aug 2022

`seqno` and `subwallet_id` are saved into storage via `store_int()` but loaded via `load_uint()`. This can lead to exceptions in case of negative/too big values.

Report ↗
LowOpenCode DuplicationTON Vesting · CertiK · 5 Aug 2022

Loading data from the storage is done by the identical code several times. `locked_amount` calculation is done by the identical code two times.

Report ↗
LowOpenFunction return value and argument types are notTON Vesting · CertiK · 5 Aug 2022

Function declarations contain `_` instead of real return type. Argument types are omitted.

Report ↗
LowOpenUsing of arbitrary integers in bitwise logical opTON Vesting · CertiK · 5 Aug 2022

`allow_elector` and `can_use_restricted` are 1-bit uint. However, they are used as part of logical expression. This can lead to accidental errors, like: ```c if (3 & 4) { ;; never happens } ```

Report ↗
Latest TON audit reports
TON Foundation Multisignature Wallet · Trail of Bits · 3 high · 2 mediumTON-EVM Bridge · CertiK · 1 high · 4 medium · 18 lowTON Stablecoin · CertiK · 1 high · 3 medium · 5 lowTon Bridge Web Application · CertiK · 1 medium · 2 low
All 6 TON audit reports

1 other security report listed, not counted

ReportSecurity firmDateScopeCritical findingsFindingsSource
TON Foundation Multisignature WalletSecurity firm: Trail of BitsDate: Scope: Not recorded; see the reportNone openFindings: 3 high · 2 medium
3 fixed · 1 acknowledged · 1 open
GitHub ↗
TON-EVM BridgeSecurity firm: CertiKDate: Scope: Files listedNone openFindings: 1 high · 4 medium · 18 low
8 fixed · 15 open
skynet.certik.com ↗
TON StablecoinSecurity firm: CertiKDate: Scope: Not recorded; see the reportNone openFindings: 1 high · 3 medium · 5 low
8 fixed · 1 open
skynet.certik.com ↗
Ton Bridge Web Application

Penetration test of off-chain systemsNot counted as an audit report

Security firm: CertiKDate: Scope: Not recorded; see the reportNone openFindings: 1 medium · 2 low
3 fixed
skynet.certik.com ↗
TON Masterchain Contracts Formal VerificationFormal verificationSecurity firm: CertiKDate: Scope: Not recorded; see the reportNone openFindings: 1 medium · 4 low
4 fixed · 1 open
skynet.certik.com ↗
TON VestingSecurity firm: CertiKDate: Scope: Not recorded; see the reportNone openFindings: 6 low
2 fixed · 4 open
skynet.certik.com ↗
The Open Network - Audit 1 (Phase 2)Security firm: CertiKDate: Scope: Not recorded; see the reportNone openFindings: 1 high · 2 medium · 19 low
22 fixed
skynet.certik.com ↗
02 · Control

Who can change it?

Contracts1

AddressChainSource code
0x76a797a59ba2c17726896976b7b3747bfd1d220fChain: BNB ChainSource code: Verified source (exact match, checked 13 Sep 2026)

All 1 address and the files the reports name

05 · Incidents

Has TON been hacked?

0incidents on record
06 · Protection

What protects TON day to day?

Bug bounty · platform, largest reward, scopeNot recorded yet
Operational security · certifications heldNot recorded yet
Monitoring · Teamcoming soon

TON security: common questions

Is TON audited?

Trustblock holds 6 public audit reports for TON, dated 1 Aug 2022 to 25 Mar 2024. The latest is by Trail of Bits (“TON Foundation Multisignature Wallet”).

Who audited TON?

2 security firms wrote the reports Trustblock holds for TON: CertiK and Trail of Bits.

Are there open findings in TON’s audits?

77 findings in 7 reports: 50 fixed, 1 acknowledged (the team chose not to change the code), 22 open, 4 informational. No critical finding is reported. Statuses are the security firms’ own.

Has TON been hacked?

No incident is on record for TON. Public incident reports, last checked 27 Nov 2026.

How this record is made. Public reports from each firm and what the chain itself answers, each read twice and compared with the original. No score, no grade. Method and limits · Something wrong? Tell us