BBQ
BBQ Protocol Whitepaper · Monograph v1.0

BBQ: A Post-Quantum Custody and Launch Layer for BNB Chain

Zero-ECC Native Account Abstraction, Goldilocks FRI-STARK batching, 4D post-quantum gas metering, and a non-pausable BNB Chain L1 forced exit.

Specification BBQ Protocol v1.0
Published December 2026
Settlement Layer BNB Chain L1
Testnet Chain ID 20481 (0x5001)
Table of Contents 00 — 06
00

Abstract

BBQ is a post-quantum Layer 2 asset custody and launch network on BNB Chain. The BBQ token deploys and launches on partner launchpad gang.fun (BNB Chain L1); holders can then migrate BBQ tokens and L1 assets to BBQ L2 for quantum-resistant custody and execution.

BBQ enforces a strict Zero-ECC invariant: 32-byte Native Account Abstraction addresses decouple identity from NIST FIPS 204 (ML-DSA-65) and FIPS 205 (SLH-DSA-SHA2-128s) keys, while transparent Goldilocks Fp/Fp² BBQ-STARK batches prove arithmetic conservation and range bounds in Stage 1 toward full recursive signature aggregation (-80.8% modeled gas under BBQ 4D Gas).

For Stage 2 L1 settlement, BBQBridgeEscrow.sol specifies BNB and BEP-20 custody on BNB Chain L1 with historical-root Merkle forced withdrawals and timelocked governance.

Index Terms: ML-DSA-65, SLH-DSA-SHA2-128s, Native AA, BBQ-STARK, Goldilocks Field, BBQ 4D Gas, BNB Chain L2, L1 Forced Exit.

01

Positioning & System Model

Base-layer post-quantum upgrades take years while L1 treasuries already expose secp256k1 keys. BBQ pairs partner L1 token distribution with an independent post-quantum Layer 2:

  • gang.fun (Partner Launchpad · BNB Chain L1): Partner launchpad where the BBQ token deploys and launches on BNB Chain L1.
  • BBQ L2 (Post-Quantum L2): Independent PQ-EVM Layer 2 for migrated BBQ tokens and L1 assets, providing quantum-resistant signing, dual-assumption vaults, and STARK execution.
  • L1 Exit Guarantee (Stage 2 Spec): Reserves stay escrowed in BBQBridgeEscrow.sol; users can withdraw directly on L1 against any committed historical STARK state root without sequencer cooperation.
STEP 01

gang.fun Launch

BBQ token launches on partner launchpad gang.fun (L1).

STEP 02

Migrate to BBQ L2

Bridge BBQ tokens or BNB to a 32-byte bbq0x... address.

STEP 03

PQ Custody

Operate under ML-DSA-65, SLH-DSA-128s, and Track 1 STARKs.

STEP 04

L1 Forced Exit

Withdraw via L2 or prove a Merkle leaf on L1 (7-day window).

BNB CHAIN L1 · SETTLEMENT gang.fun (Partner Launchpad) 01 · BBQ Token Deploy & Launch Partner L1 Launchpad · BEP-20 BBQBridgeEscrow.sol depositBNB / depositToken(bbqRecipient32) commitStarkBatch · ISTARKVerifier requestForcedExit · 7d L1 Exit Window BBQ-L2 · POST-QUANTUM EXECUTION (#20481) 32B Native AA bbq0x... (256-bit) 0x010E PubkeyReg 0x010F AlgoRegistry BBQ-PQ v1 0x01 ML-DSA-65 0x02 SLH-DSA-128s 0x03 Orthogonal Hyb Goldilocks DEEP-FRI STARK & 4D Gas Track 1: Witness stripped · 8x LDE · 34q · -80.8% gas Track 2: 5-15% reserved raw PQ fallback lane 02 Migrate STARK Root 04 L1 FORCED EXIT Direct L2 Merkle inclusion proof to L1 Escrow (bypasses halted or censoring sequencer)
Figure 1. System topology: BBQ token launches on partner launchpad gang.fun (L1), migrates via BBQBridgeEscrow.sol to BBQ L2, and retains trustless L1 forced exit.
02

Threat Model & Zero-ECC Invariant

  1. Shor's Algorithm (CRQC): Breaks secp256k1, Ed25519, BLS12-381, KZG, and ECVRF in polynomial time; exposed keys and mempool broadcasts become directly forgeable.
  2. AI-Accelerated Cryptanalysis: Heuristic search improves lattice reduction (BKZ/sieving) and side-channel discovery, requiring orthogonal lattice (ML-DSA-65) + pure-hash (SLH-DSA-128s) redundancy.
  3. Grover, BHT & HNDL: Grover halves symmetric bit-security; BHT degrades 160-bit addresses to ~53–80 bits; HNDL adversaries record classical P2P handshakes for deferred decryption.

Protocol Invariant — Zero-ECC & 256-Bit Floor

Zero elliptic-curve dependencies across accounts, signatures, proofs, consensus, or HD derivation. Every address, hash, key, and seed root enforces ≥ 256-bit width (≥ 128-bit PQ security).

Table 1 · Full-Stack Zero-ECC Replacement Matrix Zero-ECC
Surface Legacy ECC Failure Mode BBQ Replacement
Account Auth ECDSA / Ed25519 Shor key recovery & mempool hijack ML-DSA-65 + SLH-DSA-128s + Hybrid
Addresses 160-bit (20 B) BHT collision & static key lock-in 32-byte (256-bit) Native AA bbq0x...
Proofs Groth16 / KZG Pairing group break & trusted setup Transparent Goldilocks DEEP-FRI STARK
Consensus / VRF BLS12-381 / ECVRF Forged QCs & leader grinding Hash-XMSS STARK QC + Hash-VDF
HD Wallets ECC HD Homomorphic point math broken 24-word PQ-HD hardened KMAC256
P2P Transport X25519 / Ed25519 HNDL capture & PeerID spoofing X25519MLKEM768 + ML-DSA-65 PeerID

L1 Boundary: Until BNB Chain L1 activates native PQ opcodes, single-shot L1 deposit and exit broadcasts rely on L1 accounts; all custody execution runs Zero-ECC on BBQ-L2 and L1 ISTARKVerifier uses pure-hash Keccak-256 FRI (zero BN254 wrappers).

03

Cryptography & Native Account Abstraction

Built on PQ-EVM and BBQ-PQ v1, every BBQ account is a protocol-native 32-byte AA policy commitment decoupled from any single signature scheme.

3.1BBQ-PQ v1 & Stage 1 Parameters

Table 2 · Verified BBQ-PQ v1 Wire Sizes & Precompiles (bbq-crypto / bbq-node) Chain ID 20481
Algorithm AlgID Precompile Standard & Assumption PK (B) Sig (B) Verify Gas Genesis
ML-DSA-65 0x01 0x0100 FIPS 204 · Module-LWE/SIS (Cat. 3) 1,952 3,309 12,000 ACTIVE · Track 1
SLH-DSA-SHA2-128s 0x02 0x0102 FIPS 205 · Pure SHA-2 Hash (Cat. 1) 32 7,856 65,000 ACTIVE · Vault
Hybrid ML+SLH 0x03 0x0107 FIPS 204+205 · Hybrid 1,984 11,165 78,000 ACTIVE · Tier 2
FN-DSA-512 0x07 0x0104 FIPS 206 Draft · NTRU 897 666 6,000 PROPOSED / REJECTED

ML-DSA-65 satisfies NIST Category 3 (~AES-192) with pure-integer NTT (<16 KB RAM, ~45–70 μs AVX2 verify). SLH-DSA-SHA2-128s beats 128f in both wire size (-54%: 7,856 B vs 17,088 B) and verification speed (~0.5–1.5 ms) with zero algebraic assumptions. FN-DSA-512 stays PROPOSED (rejected at genesis) due to 53-bit floating-point FFT side-channel risks. Hybrid 0x03 cross-binds both sub-signatures over M_bind with distinct contexts to block stripping or downgrade.

3.232-Byte Native AA & PQ-HD (KMAC256)

PQ-HD replaces legacy ECC HD derivation with mandatory 24-word BIP-39 entropy (256-bit; 12-word rejected) and NIST SP 800-185 KMAC256 hardened tree derivation:

PQ-HD Derivation & 32-Byte Native AA Address Eq. (1–2)
Path := m / 44' / 20481' / <alg_id>' / <account>' / <tier>' / <index>' (cc_i || ks_i) = KMAC256(K = cc_{i-1}, X = ks_{i-1} || uint32_be(index | 2^31), L = 64, S = "BBQ-HD-V1") Address32 = SHA3-256("BBQ-ADDR-V1" || init_pk_id || salt || recovery_commit || seed_migration_commit) // Format: bbq0x<64 hex> · Mainnet BSMT uses BBQ-STARK Hash for circuit efficiency

Tiers isolate roles deterministically: 0' primary auth, 1' vault co-sign, 2' hidden SLH-DSA-128s recovery_commit, 3' ML-KEM-768 scan key, and 4' algorithm-independent migration_secret. Key rotation never changes Address32; 20-byte low-bit views are display-only and forbidden for vault or bridge authorization.

3.30x010E Pubkey Registry (-37.0% Calldata)

0x010E PQ_PUBKEY_REGISTRY registers each public key once under a refundable deposit (0.10 BBQ / 20,000 deposit units) indexed by pk_id = SHA3-256(alg_id_be || pubkey). Subsequent Type 0x05 envelopes set pk_mode = 0x01 (REF_BY_ACCOUNT) (0 inline PK bytes), shrinking ML-DSA-65 wire envelopes from 5,269 B to 3,317 B — saving 1,952 B (37.0%) per transaction.

3.40x010F AlgorithmRegistry & 1-Block Circuit Breaker

0x010F AlgorithmRegistry tracks every AlgID through five states (PROPOSED → ACTIVE → DEPRECATED_NEW_ONLY → FREEZE_DIRECT_SPEND → REVOKED) with a permissionless proof-of-breakage circuit breaker:

MEV-Resistant Forgery Circuit Breaker (0x010F) Eq. (3)
M_breaker(payout_addr) = SHA3-256("BBQ-BREAKER-V1" || chain_id || alg_id || payout_addr) submitBreakageProof(alg_id, payout_addr, forged_sig) -> valid forgery => state[alg_id] = FREEZE_DIRECT_SPEND (1 block) + bounty(payout_addr)
  • Anti-Hijack Governance: No stake majority can trip the breaker without a valid forgery against the genesis challenge key (2-block Commit-Reveal handles existential forgeries). A 7-of-11 SLH-DSA-192s Security Council holds at most a 72-hour rate-limit shield, never freeze or seizure rights.
  • Zero Dormant Confiscation: Under FREEZE_DIRECT_SPEND, primary-key veto expires automatically; balances are never burned. Accounts migrate via Tier 2 SLH-DSA-128s recovery or offline Tier 4 migration_secret STARK proof (0x0106 + VK_SEED_RECOVERY, ~1–3 s local proving).
04

Execution, FRI-STARK Proving & 4D Gas

4.1Dual-Track Execution

  • Track 1 — STARK Aggregated (95%–98% Default): In Stage 1, the sequencer verifies ML-DSA-65 signatures before batching and commits witness digests into the FRI-STARK proof (418 B/tx, -80.8% modeled gas). Stage 2 / Mainnet moves full ML-DSA-65 verification and Merkle state transitions in-circuit via recursive BBQ-STARK.
  • Track 2 — Direct Fallback (5%–15% Reserved): Direct precompile verification (0x0100/0x0102/0x0107) at full 32 Gas/B anti-DoS witness pricing. Guarantees censorship resistance and SLH-DSA-128s recovery even if all provers halt.

4.2Goldilocks DEEP-FRI Parameters (bbq-stark)

Stage 1 (bbq-stark) is a pure-Rust, zero-ECC FRI-STARK engine proving arithmetic balance conservation, algebraic base-4 range bounds ([0, 2^60), eliminating modulo-p wraparound), monotonic nonces, and sequencer-attested SHA3-256 PQ witness commitments over Goldilocks Fp trace + quadratic extension Fp² (u² = 7, 128-bit) FRI/OOD challenges. Stage 2 / Mainnet adds in-circuit Merkle state-root verification, recursive signature verification, and an on-chain EVM ISTARKVerifier.

Table 3 · Goldilocks Fp/Fp² FRI-STARK Parameters (bbq-stark) & Mainnet Target Transparent STARK
Parameter Stage 1 Testnet (bbq-stark) Mainnet Target (BBQ-STARK)
Prime Field Goldilocks Fp (p = 2^64 - 2^32 + 1) + Fp² (u² = 7) Goldilocks F_p/F_p2 + Recursive BBQ-STARK
AIR Geometry 162 cols (15 core + 147 limb) · 172 constraints · deg 4 In-circuit Merkle + ML-DSA-65 + Hash-XMSS AIR
Coset LDE Generator g = 7 · 8× blowup · Fp² OOD & FRI Disjoint coset · 8×–16× blowup · Fp² FRI
FRI Queries 34 queries · 64-tx: 20.6 ms prove / 2.6 ms verify 64-tx micro-batch (1.5–2.2 s) · <10 ms verify
PQ Soundness 102-bit (min(34×3, 128-(2 log2 N + 2))) · SHA3-256 100–128 bit · BBQ-STARK Hash / Keccak-256 L1

4.3BBQ 4D Gas Metering

BBQ meters four independent BBQ 4D dynamic fee dimensions so witness bandwidth, STARK proving, and public-key state never distort execution pricing:

BBQ 4D Gas Metering Equation Eq. (4)
Fee_tx = G_exec * P_exec // 1. Execution compute (base fee burned) + B_witness * alpha_lane * P_bw // 2. Witness DA (Track 1 amortized vs Track 2 raw) + W_pqc(alg, lane) * P_pqc // 3. Native PQC verify or STARK proving + dS_state * P_storage // 4. State deposit (90% refund / 10% burn)
Table 4 · Verified 4D Gas Breakdown (Registered ML-DSA-65, bbq-node/src/gas.rs) -80.8% Track 1
Dimension Track 2 Direct Track 1 STARK Basis
1. Compute 21,000 21,000 Base transfer execution
2. Witness DA 113,888 2,688 T2: 3,559 B × 32 · T1: 168 B × 16
3a. PQ Verify 12,000 0 0x0100 skipped inside Track 1 batch
3b. STARK Prove 0 4,500 Amortized FRI-STARK proving gas
Total Gas 146,888 28,188 80.8% reduction (118,700 Gas saved; mainnet 75%–90%)

Fee Split: Track 1 proving fees allocate 85% Provers / 10% Validators / 5% BBQ Security Bounty; Track 2 verify fees burn 70% and pay 30% to validators.

TYPE 0x05 PQ_AA_TX 0x010E Ref (-37.0%) Envelope: 3,317 B TRACK 1 · STARK AGGREGATED (95%–98%) Goldilocks DEEP-FRI Batch Prover F_p + F_p2 (u^2=7) · 162 cols · 172 constr · 8x · 34q Witness stripped -> 418 B/tx · 28,188 Gas (-80.8%) Split: 85% Prover · 10% Validator · 5% Bounty TRACK 2 · DIRECT FALLBACK (5%–15%) Native Precompile Verification 0x0100 ML-DSA · 0x0102 SLH-DSA · 0x0107 Hybrid Raw witness -> 3,559 B/tx · 146,888 Gas Bypasses provers · Anti-censorship guarantee FINALITY L2 State Root 4D Gas Metered 102-bit F_p2 FRI -> L1 Escrow
Figure 2. Dual-track execution pipeline: 0x010E pubkey resolution, Track 1 Goldilocks FRI-STARK witness stripping (-80.8% gas), and Track 2 direct precompile fallback.
05

BNB Chain L1 Bridge & Forced Exit

5.1Stage 2 Escrow Custody & Sequential STARK Settlement

  • Deposits (BBQBridgeEscrow.sol · Stage 2 Spec): depositBNB and depositToken target non-zero 32-byte bbqRecipient32 addresses, revert bare BNB transfers, and use balance-delta accounting for fee-on-transfer BEP-20s.
  • Sequential Roots & Cross-Layer Alignment: commitStarkBatch enforces batchId == latestBatchId + 1 and prevStateRoot == latestStateRoot via zero-ECC ISTARKVerifier (unit-tested with MockSTARKVerifier; production EVM Keccak-256 FRI verifier and unified L1/L2 state-tree codec land in Stage 2).

5.2Non-Pausable Trustless L1 Forced Exit

requestForcedExit and finalizeForcedExit omit whenDepositsNotPaused and accept any historical committed knownStateRoots[stateRoot]: neither a halted sequencer, rapid batching, nor setDepositsPaused(true) can block L1 exits.

Domain-Separated L1 Forced-Exit Merkle Leaf & Node Eq. (5–6)
leaf = keccak256(0x00 || "BBQ-FORCED-EXIT-V1" || block.chainid || address(this) || bbqAccount32 || msg.sender || token || amount || exitNonce) node(a, b) = (a <= b) ? keccak256(0x01 || a || b) : keccak256(0x01 || b || a)
Table 5 · BBQBridgeEscrow.sol Stage 2 L1 Forced-Exit Security Invariants Stage 2 Spec
Invariant Contract Mechanism Attack Blocked
Exit Window MAINNET_EXIT_WINDOW = 7 days ([1h, 30d]) Allows L2 challenge without trapping users
Non-Pausable depositsPaused gates deposits & batches only Sequencer censorship or exit freeze
Historical Roots knownStateRoots[root] + stateRootBatchId ≥ nextMinExitBatchId Rapid-batch forced-exit proof invalidation
Binding & Nonce 0x00 leaf binds msg.sender, chainid, bridge & exitNonce Hijack, replay & post-challenge bricking
Anti-Replay usedExitLeaves (on finalize) + activeExitId + challengedRootLeaves Same-batch, repeat or challenged replays
Gov Timelock 2-step schedule/execute verifier & sequencer (exitWindow + 2d) Instant malicious verifier or sequencer swap
Solvency & Proof totalReservedForExits ≤ totalEscrowed + verifyExitChallenge Over-subscription & arbitrary exit cancellation

Once block.timestamp >= unlockAt, any caller may trigger finalizeForcedExit(exitId) (CEI + ReentrancyGuard); funds release exclusively to req.recipient.

06

Three-Stage Rollout

STAGE 01 COMING SOON

BBQ Testnet (BBQ-Testnet)

Pure-Rust bbq-node (Chain ID 20481) implementing real ML-DSA-65, SLH-DSA-128s, and Hybrid signing, Goldilocks Fp/Fp² range-checked FRI-STARK batch proving, 0x010E pubkey registry, 0x010F circuit breaker, and 4D Gas. Public testnet coming soon at /testnet.

Real FIPS 204 / 205 8× LDE / 34q F_p2 STARK -80.8% Modeled Track 1 Gas
STAGE 02 NEXT

BNB Chain Testnet Bridge

Unify the cross-layer L1/L2 Merkle state-tree codec, move state-root proofs in-circuit, and deploy BBQBridgeEscrow.sol (historical roots, exitNonce, exitWindow + 2d governance timelock) with a production EVM Keccak-256 ISTARKVerifier on BNB Chain Testnet.

BBQBridgeEscrow.sol Keccak-256 Outer FRI Forced-Exit Drills
STAGE 03 PLANNED

Native Launchpad on BBQ L2

Mainnet with 7-day L1 exit window, permissionless multi-GPU BBQ-STARK prover market (Phase 1: 500 TPS / 2 s blocks; Phase 2: 2,000 TPS), BBQ Security Bounty vault, and native bonding-curve and fair-launch infrastructure directly on BBQ L2.

7-Day L1 Exit Window GPU Prover Market Native L2 Launchpad