What was checked
| Method | Result |
|---|---|
| Manual line-by-line review: access control, arithmetic, events, SWC weakness checklist | 12 findings, listed below |
| Unit tests (Hardhat 2.30) | 55 passing |
| Test coverage | 100% lines · 100% functions · 97.4% branches (the 3 uncovered branches cannot be reached) |
| Stateful fuzzing: 6 actors including unauthorised callers, 17 operation types, 7 invariants checked after every step, home and bridged chain | 4,800 operations, 0 violations |
| Static analysis: Slither 0.11.6, 102 detectors | 1 result, accepted (I-06) |
| On-chain acceptance, 15 checks per network | TRON local 15/15 · TRON Shasta 15/15 · BSC testnet 15/15 |
| Ownership handover on BSC testnet: nominate, accept, grant roles, revoke old roles, both directions | passed |
| Mainnet deployment: bytecode, constructor arguments, owner and roles | matches the reviewed build exactly |
Invariants fuzzed: balances sum to total supply · total supply = minted − burned + bridged in − bridged out · issued supply never exceeds the cap · nothing is minted on a bridged chain · role counters match the real holders · no balance moves while paused · a bridged chain can never have a minter.
Findings
All control and all supply are in one wallet on mainnet
open · operationalWallet 0xCF97…4Fd9 is the owner, holds the minter, burner and pauser roles, and holds 100% of the 3,000,000 supply. If that key is lost or stolen, an attacker can pause all transfers, including DEX trading, grant themselves roles and move the whole supply.
Recommendation: move ownership and the treasury to Safe multisig wallets (for example 2-of-3 with hardware keys) before adding liquidity or handing over to the client. Hand over four things: ownership, roles, the token balance and the LP tokens.
The bridge rate limit can be used twice around a window boundary
open · inactive (no bridge role assigned)The bridge mint limit uses a fixed 24-hour window. A bridge can mint the full limit just before a window ends and again just after it, which allows up to twice the limit within minutes. A test reproduces this.
Recommendation: use a rolling window in the next version, or set the limit to half the intended daily maximum.
A compromised bridge could freeze new issuance
open · inactive (no bridge role assigned)If a compromised bridge delivers tokens that never left another chain and they are later burned, the burned total can exceed the minted total. issuedSupply(), mint() and lowerCap() then revert until reconciled. Transfers keep working. A test reproduces this.
Recommendation: use saturating subtraction in issuedSupply() in the next version, keep the bridge limit low, and give the bridge role only to audited bridge contracts.
Informational
- I-01Three defensive checks can never trigger: minting on a bridged chain, a zero sender in transfers and a zero holder in approvals. Harmless.
- I-02After renounceOwnership, existing role holders keep their roles and nobody can revoke them. Renounce roles before renouncing ownership.
- I-03cancelOwnershipTransfer emits OwnershipTransferStarted(owner, 0x0). Indexers should read it as a cancellation.
- I-04Pausing also blocks bridge deliveries; bridge messages in flight wait until the token is unpaused.
- I-05circulatingSupply loops quadratically over its input. It is a view function for off-chain use only.
- I-06The bridge window uses block.timestamp (Slither). Seconds of validator drift do not matter for a 24-hour window.
- I-07Tokens sent to the token contract's own address are locked; there is no recovery function.
- I-08bridgeBurn consumes the holder's allowance, so the future bridge adapter must use this interface.
- I-09On mainnet the cap equals the supply (3,000,000): no new tokens can be minted except to replace burned ones. The client specification mentioned 2,000,000,000; confirm before liquidity is added.
Strengths
- No external calls, so there is no reentrancy surface.
- Administrators cannot burn tokens from a wallet without that wallet's approval.
- The supply cap can only be lowered, never raised.
- Two-step ownership transfer; the deploying wallet receives no privileges.
- Every privileged action emits an event, giving a complete on-chain admin log.
- Solidity 0.8.30 with checked arithmetic and custom errors.
How to reproduce
npx hardhat test # 55 tests FUZZ_SEEDS=3 FUZZ_STEPS=800 npx hardhat test test/fuzz.invariants.test.js npx hardhat coverage slither .