Title
[BFT-A][EPIC] Implement CBE Curve Spec in Ordered Rollout
Purpose
This meta issue is the authoritative execution-order controller for the CBE curve work defined by:
CBE Bonding Curve — Complete Formula Reference
CBE Bonding Curve — Rust Implementation Specification
It does not replace the implementation issues. It defines the sequence they must land in so the branch converges on one canonical curve engine without scope drift.
Locked Team Decisions
GRAD_THRESHOLD = 2_745_966 * SCALE
SELL_CBE is controlled by explicit protocol flag sell_enabled: bool
sell_enabled = false at genesis and may become true later by config/upgrade
treasury_locked is out of scope on this branch
SELL_CBE solvency is reserve-only
Ordered Rollout
Phase 1: Canonical Shapes
[BFT-A][R8] Establish canonical CBE curve types and fixed-point state model #1923 [BFT-A][R8] Establish canonical CBE curve types and fixed-point state model
Define authoritative types in lib-types
Lock canonical mutable curve state and u48 nonce representation
[BFT-A][R9] Replace curve arithmetic with 18-decimal U256 fixed-point math and deterministic integer sqrt #1924 [BFT-A][R9] Replace curve arithmetic with 18-decimal U256 fixed-point math and deterministic integer sqrt
Lock arithmetic contract before implementing execution
[BFT-A][R8] Collapse CBE curve math to one canonical piecewise-linear engine #1925 [BFT-A][R8] Collapse CBE curve math to one canonical piecewise-linear engine
Build one pure math engine for price, buy, and sell computations
Phase 2: Wire Format and State Authority
[BFT-A][R9] Add fixed-width BUY_CBE and SELL_CBE transaction payloads #1928 [BFT-A][R9] Add fixed-width BUY_CBE and SELL_CBE transaction payloads
Lock byte-level transaction format
[BFT-A][R4] Persist canonical CBE curve state and restart reconstruction inputs #1926 [BFT-A][R4] Persist canonical CBE curve state and restart reconstruction inputs
Establish persisted state authority for restart/replay
[BFT-A][R4] Rework genesis to initialize zero-state CBE curve economics #1927 [BFT-A][R4] Rework genesis to initialize zero-state CBE curve economics
Make genesis/config authoritative for zero-state curve deployment
Phase 3: Execution Cutover
[BFT-A][R8] Add dedicated CBE curve executor lane and remove disabled legacy dispatch #1929 [BFT-A][R8] Add dedicated CBE curve executor lane and remove disabled legacy dispatch
Introduce canonical execution lane
[BFT-A][R9] Implement canonical BUY_CBE issuance per mint-on-buy spec #1930 [BFT-A][R9] Implement canonical BUY_CBE issuance per mint-on-buy spec
Land the canonical buy path first
[BFT-A][R8] Implement canonical SELL_CBE redemption and solvency checks #1931 [BFT-A][R8] Implement canonical SELL_CBE redemption and solvency checks
Land canonical sell path with sell_enabled gating and reserve-only solvency
Phase 4: Hardening and Governance Boundary
[BFT-A][R9] Remove runtime/background mutation and isolate curve graduation to block execution #1932 [BFT-A][R9] Remove runtime/background mutation and isolate curve graduation to block execution
Remove non-canonical runtime mutation paths
[BFT-A][R6] Freeze immutable curve logic and gate curve parameter changes behind protocol upgrade #1933 [BFT-A][R6] Freeze immutable curve logic and gate curve parameter changes behind protocol upgrade
Lock immutable-vs-upgrade-gated boundary after core implementation is stable
Implementation Rule
Do not skip ahead in a way that makes later issues rewrite earlier authoritative work.
Allowed parallelism:
Minor prep work is allowed if it does not change authoritative state/math/tx behavior.
Canonical execution should follow the phase order above.
Done Criteria
All linked issues are complete in the order above
The branch implements one canonical CBE curve engine matching the two authoritative docs
No legacy/generalized path remains authoritative for curve consensus behavior
Title
[BFT-A][EPIC] Implement CBE Curve Spec in Ordered Rollout
Purpose
This meta issue is the authoritative execution-order controller for the CBE curve work defined by:
CBE Bonding Curve — Complete Formula ReferenceCBE Bonding Curve — Rust Implementation SpecificationIt does not replace the implementation issues. It defines the sequence they must land in so the branch converges on one canonical curve engine without scope drift.
Locked Team Decisions
GRAD_THRESHOLD = 2_745_966 * SCALESELL_CBEis controlled by explicit protocol flagsell_enabled: boolsell_enabled = falseat genesis and may becometruelater by config/upgradetreasury_lockedis out of scope on this branchSELL_CBEsolvency is reserve-onlyOrdered Rollout
Phase 1: Canonical Shapes
[BFT-A][R8] Establish canonical CBE curve types and fixed-point state modellib-typesu48nonce representation[BFT-A][R9] Replace curve arithmetic with 18-decimal U256 fixed-point math and deterministic integer sqrt[BFT-A][R8] Collapse CBE curve math to one canonical piecewise-linear enginePhase 2: Wire Format and State Authority
[BFT-A][R9] Add fixed-width BUY_CBE and SELL_CBE transaction payloads[BFT-A][R4] Persist canonical CBE curve state and restart reconstruction inputs[BFT-A][R4] Rework genesis to initialize zero-state CBE curve economicsPhase 3: Execution Cutover
[BFT-A][R8] Add dedicated CBE curve executor lane and remove disabled legacy dispatch[BFT-A][R9] Implement canonical BUY_CBE issuance per mint-on-buy spec[BFT-A][R8] Implement canonical SELL_CBE redemption and solvency checkssell_enabledgating and reserve-only solvencyPhase 4: Hardening and Governance Boundary
[BFT-A][R9] Remove runtime/background mutation and isolate curve graduation to block execution[BFT-A][R6] Freeze immutable curve logic and gate curve parameter changes behind protocol upgradeImplementation Rule
Do not skip ahead in a way that makes later issues rewrite earlier authoritative work.
Allowed parallelism:
Done Criteria