Amadeus Protocol
Audit date ·
Audits are prepared by the site owner with a self-hosted (local) AI, checked against the exact commit above, and hand-edited before publishing. This is not financial, legal, or investment advice. Read it as one person's notes on one commit at one date. Do your own research.
This is a point-in-time review of code quality and tokenomics at the commit above, not a safety certification. Projects can change after this date. Check for newer releases or a newer audit before relying on these scores.
Useful-PoW L1 with Freivalds-sampled work verification and an epoch validator set rebuilt from vault stakes. The money rules are pure integer arithmetic, but 25% of paid emission goes to a single address and the live supply cannot be produced by the audited emission formula.
🪙 AMADEUS PROTOCOL (AMA) — Code & Tokenomics Audit
Repo: amadeusprotocol/node at commit ab67f03a6ffeb96acd4bde4d962bcf19e7b58164 (Elixir node, Rust consensus NIF)
Date: 2026-11-01 Scope: code review of the money path (emission curve, coin create/mint, treasury tax, vaults, validator-set rules, key storage), tokenomics, live network numbers from nodes.amadeus.bot/api/chain/stats fetched 2026-11-01. The Freivalds sampler was read as a statement, not cryptanalytically re-proved. Tests read, not executed.
🎯 Verdict: MIXED (code 7.0 / tokenomics 4.0)
Amadeus is an L1 whose "mining" is sampled useful computation: solvers submit a matrix-multiplication solution, verified by three-vector Freivalds against a committed verifier random, with BLS aggregate signatures and a validator set rebuilt each epoch from vault stakes. The rules in the audited code are clean arithmetic: the emission curve is a pure integer function, the 25% network tax is funded from the leftover pool rather than minted separately, the bridge is proof-gated against stored remote roots, and the validator roster is rule-based (every vault validator with ≥1M AMA stake plus the top 33 solvers), not a curated list.
It lands in MIXED on three tokenomics facts. The network tax is 25% of paid solver and vault emission — above the 10% band in this corpus. The tax lands in the balance of a single BLS address, TREASURY_DONATION_ADDRESS, which is also the hardcoded cold admin of PRIME, an admin-mintable symbol; no timelock or multisig exists on-chain. And the observed supply cannot be produced by the audited code: the curve this repo contains sums to 30,162,597 AMA through epoch 892, while the live chain reports 709,483,635.15 AMA total supply — 95.7% of the money on the chain did not come from this repo's emission formula. The published claim that the 1B cap is "emitted entirely through useful proof of work with no premine" is not reproducible from the audited code at this commit; the only code path that could produce the observed state is the coin create_and_mint admin path or a supply rule living outside this repo. On the code side: unsafe lifetime transmutes through the consensus NIF, the work acceptance is probabilistic (error ≤ 1/8 per accepted solution), the node key is stored plaintext, and the repo has no CI.
🔑 At a glance
| Field | Value |
|---|---|
| Project | Amadeus Protocol (AMA) |
| Chain / consensus | Own L1, Useful PoW (Freivalds), 500 ms blocks, epoch = 100,000 blocks |
| Code score | 7.0 / 10 |
| Tokenomics score | 4.0 / 10 |
| Risk score | 4.0 / 10 (the lower of the two) |
| Verdict | MIXED |
Live numbers (fetched 2026-11-01, height 89,275,658): circulating 597,280,526.15, total supply 709,483,635.15, vault-locked 112,203,108.99, burned (fees) 2,274,223.80, 121 entries in the validator set, emission for the current epoch 188,952.39.
🔗 Links & sources
| What | Link | Status |
|---|---|---|
| 🏠 Homepage | https://ama.one/ | ✅ fetched |
| 💻 Source | https://github.com/amadeusprotocol/node at ab67f03a | ✅ cloned in this audit |
| 🔎 Explorer | https://explorer.ama.one/ (data via nodes.amadeus.bot/api/chain/stats) | ✅ live API read |
| 📄 Whitepaper | not found in repo; emission constants in code | — |
| 📣 Announcement | not found | — |
| 💬 Socials | github.com/amadeusprotocol, X @amadeusprotocol | ✅ org page read |
🧮 Risk score inputs
| # | Finding | file:line | Reachable | Deduction | Applies to |
|---|---|---|---|---|---|
| 1 | Network tax: 25% of paid solver and vault emission routed to the treasury. Above the 10% band used in this corpus (3% → −1, 10% → −2, 75% → −3; 25% placed by inference) | ex/native/rdb/src/consensus/bic/epoch.rs:13-15 | live every epoch | −3.0 | tokenomics |
| 2 | The tax is credited to the balance of one BLS address, TREASURY_DONATION_ADDRESS; the same key is hardcoded as PRIME_ADMIN_COLD. PRIME is admin-mintable, pausable, soulbound, minting exclusive to three admin keys. No timelock, no multisig, no on-chain spending rule — a live single key | consensus/bic/epoch.rs:32-36, consensus/bic/prime.rs:25-45 | live | −2.0 | tokenomics |
| 3 | Observed supply is not produced by the audited formula: the repo's own curve sums to 30,162,597 AMA through epoch 892, live supply is 709,483,635.15. total_supply_y3 and total_supply_y30 return hardcoded constants (804,065,972 / 1,000,000,000) that the same formula computes as 113M and 371M. The published "entirely mined, no premine" claim is not reproducible from this repo; the bootstrap path entry_genesis.ex writes vault rows directly for configured keys | consensus/bic/epoch.rs:41-47, ex/lib/api/api_chain.ex:141-161, ex/lib/consensus/models/entry_genesis.ex:157-171 | live chain state | −1.0 | tokenomics |
| 4 | 49 unsafe usages in the consensus native crate, one SAFETY comment: unsafe impl Send/Sync for DB resources and transmute to 'static lifetimes on the iterator and transaction paths — the soundness of the NIF thread sharing is asserted, not argued | ex/native/rdb/src/lib.rs:35-36,54-55,78-79,87,240,411,423,758,1098 | live (every block apply) | −1.0 | code |
| 5 | Solution acceptance is probabilistic: Freivalds with three random vectors gives error ≤ 2⁻³ per accepted matrix, no repetition or additional soundness layer on the consensus path | consensus/bic/sol.rs:45, sol_freivalds.rs:68-110 | live (block apply) | −0.5 | code |
| 6 | Node key custody: private seeds stored plaintext as a Base58 file in the work folder, no encryption, no KDF; the OS filesystem is the whole boundary | ex/config/runtime.exs:61-79 | live (every node) | −1.0 | code |
| 7 | No CI in the node repo: 14 Elixir security tests and Rust golden-vector tests exist, but nothing runs them automatically; sign_release.sh signs, no build gate | repo root (/contents/.github/workflows → 404), ex/test, ex/native/rdb/src/consensus/tests | release path | −0.5 | code |
code deductions, one at a time:
1.0 -> 2.0 -> 3.0
tokenomics deductions, one at a time:
3.0 -> 5.0 -> 6.0
code_score = 10 − (1.0 + 0.5 + 1.0 + 0.5) = 7.0
tokenomics_score = 10 − (3.0 + 2.0 + 1.0) = 4.0
risk_score = min(7.0, 4.0) = 4.0
Band check: 4.0 sits in 3.0-7.9 = MIXED (vocabulary from AGENTS.md). No instant-HIGH-RISK override fired: no claim the code contradicts outright was proven — the supply-origin item is an arithmetic unreachability, stated as such.
✅ Verified good (code)
- Emission is a pure integer function per epoch, no floating point,
checked_mul/saturating_subthroughout the money path (25 guarded arithmetic sites in the consensus crate). - The tax is funded from the undistributed leftover, not minted on top (
epoch.rs:245comment and code agree). - Coin create and mint are capped (
mint_amount_exceeds_capatcoin.rs:180and:234). - Bridge: proof-gated against stored remote state roots, once per nonce, and the escrow address is not a valid BLS key so nobody can sign for it (
bridge.rs:1-25). - Validator set is rule-based each epoch: all vault validators with stake ≥
VALIDATOR_MIN_STAKE(1M AMA) plus top 33 solvers, reshuffled; vault-to-validator changes pass through a pending-epoch queue (lockup_vault.rs:575, 643). - Tests exist for both curves (golden vectors at
epoch.rstest asserts),mix.lockpresent, release signing script present.
🔍 Open questions (not scored)
- Where the 679.3M AMA above this repo's curve came from: the BSV-side hub contract, a supply rule outside
node, or the bootstrap vault path. Needs the launch record to answer. - Live
emission_for_epoch(188,952.39) is 249.2 AMA above the formula value for epoch 892 computed exactly in integers (188,703.16); the difference is unexplained in the audited code — possibly carried pool amounts. - Tests were read, not executed; the Freivalds sampler not cryptanalytically re-proved; PRIME-to-$AMA conversion (TGE) unpublished as of 2026-10-16 per third-party reports.
- 25% tax band value is inference from published pairs; the rubric skill was not available in this pass.
Files we opened
ex/native/rdb/src/consensus/bic/epoch.rs:13-15
ex/native/rdb/src/consensus/bic/epoch.rs:32-36
ex/native/rdb/src/consensus/bic/epoch.rs:41-47
ex/lib/api/api_chain.ex:141-161
ex/lib/consensus/models/entry_genesis.ex:157-171
ex/native/rdb/src/consensus/bic/prime.rs:25-45
ex/native/rdb/src/lib.rs:35-36
ex/native/rdb/src/consensus/bic/sol_freivalds.rs:68-110
ex/config/runtime.exs:61-79
ex/native/rdb/src/consensus/bic/lockup_vault.rs:575
ex/lib/api/db_entry.ex:174
Every file listed here was opened by us during the audit. Nothing here is a guess.