Magi Security and Bug Hunt Report // February - May

in #hive18 days ago (edited)

ssssssss.png

Period: February 16 – May 16, 2026 (90 days)
Contributors: 7
Result: 231 confirmed bugs found and fixed. 100% remediation rate.


Cross-chain infrastructure is the most attacked target in crypto. Not because they're poorly built but because they move real money between chains, and real money attracts serious attackers. Since 2021, bridge exploits have cost users over $4.5 billion. In almost every case, the vulnerability existed before launch. It just wasn't found.
We decided to find ours first.
Over 90 days, we ran 20 audit passes across 30 repos using 10 distinct methodologies all including comprehensive penetration tests. We have found that simple code audits only ever reveal a fraction of overall bugs.
The newly added approach: scraping every security commit THORChain and Chainflip ever pushed - 5,392 commits, ~59,000 individual evaluations against our codebase and asking one question for each: does the function this fixed exist in Magi? Not the code. The function. Leveraging the industry’s accumulated failure history to harden Magi.
We take our security very seriously and before EVM, ZK proofs, DASH and Pendulum launch we intend to reapply this methodology once again, with up to ~500 000 individual checks across our codebase. One historical security-relevant diff evaluated against an equivalent Magi trust boundary, state transition, or function surface.”

No human team could have done this volume. That was the point. Using the tools we have and attacking every single angle with sheer volume over every relevant bug fix done on comparable protocols and a varied multi-approach methodology before this helped us harden the system significantly. All confirmed findings underwent manual validation and remediation review.

The bug hunting never stops, as we introduce new systems, more bugs are introduced that we will be systematically covering as we move along.

1. AUDIT SCOPE & METHODOLOGY

Coverage

MetricValue
Repos audited30 core protocol + Altera
Competitor commits scraped (reference)5,392 (THORChain + Chainflip)
Commit-to-repo evaluations~59,000
Scenarios tested1500+ adversarial
Audit passes20
Distinct methodologies10

False Positive Elimination: Potential findings were not accepted based on static analysis or AI detection alone. Each confirmed issue required validation through live exploit reproduction on testnet or equivalent adversarial simulation.

Methodologies Employed

#MethodApplication
1Operational ApproachCore methodology: attack first, prove everything, kill false positives
2Three-Pass Line-by-LineInitial audit — automated scan → verification → lifecycle trace
3Adversarial Red-TeamInfrastructure reachability scan + attack chain construction
4Four-Lens Parallel AuditBug class × Invariant × Trust boundary × State machine — 4 agents in parallel
51500-Scenario Stress Testing1500 discrete attack scenarios across 7 categories, live testnet exploits
6Cross-Codebase Reference5,392 competitor security commits functions mapped against 11 repos. Exploit lineage analysis + vulnerability pattern transplantation detection
7Research-Informed Pattern Mapping30+ real-world exploits ($2B+ in losses) mapped to Magi architecture
8Live Penetration TestingSSH to production node, MongoDB queries, GQL simulation, L1 TX broadcast
9Commit-by-Commit Diff Comparison60 000 diffs individually checked against Magi. Isolating security-relevant diffs and tracing equivalent trust boundaries
10Direct Attack Path TracingTop 14 responsible disclosures traced to equivalent Magi code

2. SUMMARY TABLE — FINDINGS BY SEVERITY & CATEGORY

231 Confirmed Fixes

TypeCountDescription
Security vulnerabilities58Auth bypass, overflow, quorum bypass, injection, fund theft vectors
Stability fixes60Panics, nil derefs, deadlocks, goroutine leaks, node halt conditions
Logic bugs113Incorrect behavior with fund impact
TOTAL231All with commit evidence on GitHub

Security Vulnerabilities by Severity (58)

SeverityCount
Critical8
High16
Medium22
Low12

By Category

CategorySecurityStabilityLogicTotal
TSS / Cryptographic912829
Gateway / Accounting631423
DEX / Swap801523
Oracle / Relay371222
UTXO Mapping94821
EVM / Account Mapping112518
State Engine / Runtime414927
P2P / Network29617
Infrastructure45817
Altera (functional)242834

3. NOTABLE FINDINGS — CRITICAL SEVERITY

DEX Pool Init — Fund Theft

Repo: dex-contracts | Found: 2026-05-03 | Fixed: 2026-05-03
No auth check on init export.

BLS Quorum Bypass — 20 Sub-Quorum Commitments On Testnet

Repo: go-vsc-node | Found: 2026-05-15 | Fixed: 2026-05-15
vsc.tss_commitment verified BLS signature math but never checked 2/3 weighted quorum.
Fix: ef420b48 (Milo)

TSS Session Nonce — Keygen/Reshare Collision

Repo: go-vsc-node | Found: 2026-05-15 | Fixed: 2026-05-15
SetSessionNonce from tss-lib v3 was never called.
Fix: 64d88c1c (Milo)

Gas Fee Integer Overflow — Balance Increases on Withdrawal

Repo: account-mapping | Found: 2026-04-28 | Fixed: 2026-05-01
int64(21000 * gasFeeCap) wraps negative when baseFee >= 219,604 gwei. Withdrawal deducts a negative fee → user balance increases. Arithmetic overflow.
Fix: 9ed1f8f (lordbutterfly)

DoS Hardening — Sleep Loop + Simulate Bomb + Pubsub Flood

Repo: go-vsc-node | Found: 2026-03-29 | Fixed: 2026-03-29
Block producer sleep loop unbounded (infinite spin).
Fix: 3f88991b (lordbutterfly) — bounded iterations, max 10 simulate calls, HTTP timeouts.

WASM Gas Underflow — Unlimited Contract Execution

Repo: go-vsc-node | Found: 2026-03-26 | Fixed: 2026-03-28
Gas subtraction had no underflow guard. Contract could consume unlimited compute by wrapping gas counter below zero.
Fix: fd56def (lordbutterfly) — safe subtraction with underflow check.

ETH Header Chain Validation — Fake Deposit Proofs

Repo: account-mapping | Found: 2026-05-04 | Fixed: 2026-05-07
HandleAddBlocks stored oracle-submitted ETH headers with no parent hash linkage.
Fix: 32a0c89 (tibfox) — chain-validate ETH headers via parent_hash.

MPT Inline-Node Forgery — Proof Verification Bypass

Repo: account-mapping | Found: 2026-05-04 | Fixed: 2026-05-07
Merkle Patricia Trie verifier skipped hash check for inline nodes (< 32 bytes).
Fix: 9458140 (tibfox) — validate inline-node bytes against parent reference.


4. REMEDIATION STATUS

All 231 bugs have been fixed. Each fix has a corresponding commit on GitHub.

Fix Velocity

MetricValue
Total fix commits231
Average finding-to-fix time~2.1 days
Same-day fixes (audit → commit)4 occurrences (Mar 26, Mar 29, Apr 15, May 15)
Largest single burst38 fixes in 4 days (Mar 26-29, post-audit)
Monthly acceleration3.2x (Month 1 → Month 3)

Timing: Pre-Deployment vs Post-Deployment

BucketFixes%
Fixed on code not yet deployed to mainnet~12253%
Fixed on mainnet code before pool launch (~Apr 16)~6026%
Fixed on mainnet code after pool launch~4921%
TOTAL231100% fixed

79% of all bugs were fixed before the DEX pools went live with user funds.


5. BUG DENSITY — INDUSTRY COMPARISON

The Same Bug Classes. Different Outcomes.

Bug Class (ours)Our FixesProject That Missed ItTheir LossWhat Happened
Auth & Authorization16Ronin Bridge$625M5/9 keys compromised; no expiry, no detection for 6 days
Poly Network$611MCross-chain executor accepted any target contract
Nomad Bridge$190MZero-value bytes accepted as valid trusted root
Accounting & Solvency14Wormhole$320MSignature verification return unchecked; 120K wETH minted from nothing
BNB Bridge$570MForged Merkle proof accepted; 2M BNB minted
Euler Finance$197MDonation function violated solvency invariant
Key Management9Harmony Horizon$100M2-of-5 threshold; hot wallet keys on cloud
Multichain$126MAll MPC shares held by single operator
Wintermute$160MVanity address with 32-bit entropy brute-forced
Arithmetic Overflow8Cetus Protocol$223MBitshift instead of bounds check in liquidity math
KyberSwap$47MTick boundary double-count
Oracle Trust6Mango Markets$117MSelf-manipulated price; no deviation circuit breaker
Cream Finance$130MStale oracle during rebase
State & Concurrency12Curve Finance$70MCompiler reentrancy bug; state modified mid-call
Missing Rate Limits5Nomad$190MNo pause; copycats drained everything in hours
Ronin$625MNo monitoring; breach undetected 6 days

Combined industry losses from the same bug classes we fixed: >$4.5 BILLION.

Every one of these protocols went to mainnet without catching what we caught. The bugs were the same. The methodology wasn't.


6. REMAINING ROADMAP ITEMS

These are infrastructure systems to build — not unfixed bugs.

SystemPurposeStatus
Solvency monitoringCompare L2 balances vs L1 gateway balance every blockCircuit breaker Phase 1 complete
Circuit breakerAuto-halt on unauthorized outbound or balance mismatchPhase 1 complete, Phase 2 in progress

7. TEAM

ContributorFixesPrimary Impact
Milo Ridenour59Core state engine, Pendulum, DEX, TSS session binding, BLS quorum
tibfox49Contract security (EVM headers, MPT proofs, supply invariants), mapping, indexer
lordbutterfly38Security hardening (DoS, overflow, auth), EVM bridge, audit orchestration
techcoderx38TSS infrastructure, oracle, goroutine management, node stability
Andrea23Altera swap UX, transaction display, error handling
disregardfiat15TSS hardening, BLS quorum, Pendulum safety
Sagar9Altera deposit/withdraw flows, pool support

Each fix undergoes extensive team reviews before implementation and post fix testing.


Conclusion:

We're not publishing this because we're proud of how many bugs we found. We're publishing it because the alternative, shipping without looking is how $4.5 billion disappeared from other protocols. The bugs in that table aren't hypothetical. They're the same classes that broke Thorchain, Ronin, Wormhole, Nomad etc. We found them in our code before an attacker did.
Two infrastructure systems remain in progress: solvency monitoring and the circuit breaker. These aren't unfixed bugs they're defensive systems we're building on top of a codebase.
We have stress-tested Magi with high adversarial coverage compared to standard audit processes.

Magi 2026 proposal is live. Vote for a better future for crypto.

https://peakd.com/me/proposals/378

image.png

Connect with us!

Follow on X

Follow on Hive

Follow on Instagram

Official Magi Site

Vote for our Hive Witness!

Altera

Sort:  

Glad to see all that sorted out :)

Good to see that! We've heard the myth that Mythos discovered bugs and vulnerabilities in the most critical systems we have as human kind, including military systems. Of course you don't access to it, but do you use any top-end AI model to hunt for bugs? ...Because attackers will.

We use Claude for this. Once Mythos is live we will ofc start using that as well.