Deviant BCH wallet — CashTokens + covenants (Katalogos v1 · chipnet)
Find a file
Local Dev 569f40de0a feat(anthemus): SharePairAmmV2 — LP tokens + 0.30% curve fee validated; ADR-0049 ratified (snapshot 0222)
Step 3+4 of the Anthemus critical path:

- contracts/SharePairAmmV2.cash — fractional LP tokens via the reservoir model
  (outstanding = supply − treasury; add releases pro-rata, remove absorbs and
  pays the fee-grown slice) + Uniswap-V2-style fee-on-input invariant (k grows
  0.30% per swap, 100% to LPs) + treasury-drain guard (swap barred from the
  treasury input; locking-bytecode pinning; no dust drain). 4/4 mock tests at
  exact fee/mint/withdraw boundaries.
- scripts/chipnet-anthemus-amm-v2.mjs — 5/5 PASS live chipnet: bootstrap →
  fee swap (1,000→906) → LP release (exactly 1,000) → LP burn returning
  1,100 X + 909 Y (fees included). Pool end-state exact.
- services/anthemus-relay — curveLevels()/poolBook() + GET /pool: the AMM
  rendered as a maker on the SAME book (pool-as-maker path).
- wiki/decisions.md — ADR-0049 written against the validated bytecode: brand
  locked, book-first ratified, ADR-0016 refined (hub-exclusive pools only),
  maker 0 / taker 0.15% consensus-enforced, curve fee 100%-to-LP with the
  protocol slice deferred, tollBps accepted-pending, USDu preferred-not-forced.
- critical-path doc → rev. 2 (Steps 1–4 status).

Mixed shared files staged as HEAD+own-edits blobs; the concurrent session's
uncommitted work remains untouched in the working tree.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-22 00:01:12 +02:00
.claude chore(hooks): auto-regenerate snapshots/INDEX.md on snapshot writes 2026-07-07 01:58:15 +02:00
contracts feat(anthemus): SharePairAmmV2 — LP tokens + 0.30% curve fee validated; ADR-0049 ratified (snapshot 0222) 2026-07-22 00:01:12 +02:00
design docs(cross-chain): align docs to scope decision + unified-USDT reserve simulation 2026-07-12 22:38:24 +02:00
docs docs(reorg): rename DEX_Anthemus -> Anthemus_DEX; consolidate both DEX cells + the taxonomy there 2026-07-19 22:29:08 +02:00
KnowledgeBase chore: checkpoint working tree — shell Tier-B retirement + accumulated WIP 2026-06-17 01:01:37 +02:00
Parameters feat(anthemus): SharePairAmmV2 — LP tokens + 0.30% curve fee validated; ADR-0049 ratified (snapshot 0222) 2026-07-22 00:01:12 +02:00
public feat(onramp): SideShift Tier-3 in-wallet shift (ADR-0036 amendment) 2026-06-09 20:57:31 +02:00
scripts feat(anthemus): SharePairAmmV2 — LP tokens + 0.30% curve fee validated; ADR-0049 ratified (snapshot 0222) 2026-07-22 00:01:12 +02:00
services feat(anthemus): SharePairAmmV2 — LP tokens + 0.30% curve fee validated; ADR-0049 ratified (snapshot 0222) 2026-07-22 00:01:12 +02:00
shells feat(anthemus): DEX MVP — order-book covenant, discovery relay, Swap + Exchange UIs (snapshot 0220) 2026-07-21 23:40:41 +02:00
snapshots feat(anthemus): SharePairAmmV2 — LP tokens + 0.30% curve fee validated; ADR-0049 ratified (snapshot 0222) 2026-07-22 00:01:12 +02:00
spike chore: checkpoint working tree — shell Tier-B retirement + accumulated WIP 2026-06-17 01:01:37 +02:00
src docs(reorg): regroup native-ASM specs under ASM_Native + move Pari_P2P into Betting 2026-07-19 17:09:40 +02:00
telegram-orderbook chore: checkpoint in-flight work across shell, contracts, and docs 2026-07-07 02:02:05 +02:00
test feat(anthemus): SharePairAmmV2 — LP tokens + 0.30% curve fee validated; ADR-0049 ratified (snapshot 0222) 2026-07-22 00:01:12 +02:00
wiki feat(anthemus): SharePairAmmV2 — LP tokens + 0.30% curve fee validated; ADR-0049 ratified (snapshot 0222) 2026-07-22 00:01:12 +02:00
.calibration-sweep.json chore: checkpoint working tree — shell Tier-B retirement + accumulated WIP 2026-06-17 01:01:37 +02:00
.catalytic-sweep.json chore: checkpoint working tree — shell Tier-B retirement + accumulated WIP 2026-06-17 01:01:37 +02:00
.env.example feat(onramp): SideShift Tier-3 in-wallet shift (ADR-0036 amendment) 2026-06-09 20:57:31 +02:00
.gitignore feat(anthemus): DEX MVP — order-book covenant, discovery relay, Swap + Exchange UIs (snapshot 0220) 2026-07-21 23:40:41 +02:00
.kac-extract.txt chore: initial project baseline — full Deviant codebase under version control 2026-06-13 20:38:07 +02:00
.sim-athenae.json chore: initial project baseline — full Deviant codebase under version control 2026-06-13 20:38:07 +02:00
adaptive-data.json chore: checkpoint working tree — shell Tier-B retirement + accumulated WIP 2026-06-17 01:01:37 +02:00
bch-history.json chore: checkpoint working tree — shell Tier-B retirement + accumulated WIP 2026-06-17 01:01:37 +02:00
bch-market.json chore: checkpoint working tree — shell Tier-B retirement + accumulated WIP 2026-06-17 01:01:37 +02:00
BCH_Token_Economy_Concept_Paper.md chore: initial project baseline — full Deviant codebase under version control 2026-06-13 20:38:07 +02:00
bch_wallet_architecture.svg chore: initial project baseline — full Deviant codebase under version control 2026-06-13 20:38:07 +02:00
CLAUDE.md docs(reorg): rename DEX_Anthemus -> Anthemus_DEX; consolidate both DEX cells + the taxonomy there 2026-07-19 22:29:08 +02:00
deviant_technical_spec_v2.7.md chore: checkpoint in-flight work across shell, contracts, and docs 2026-07-07 02:02:05 +02:00
package-lock.json feat(t6): BCH channel-board HTLC contract + LN to T6 routing script 2026-06-26 22:12:30 +02:00
package.json feat(anthemus): SharePairAmmV2 — LP tokens + 0.30% curve fee validated; ADR-0049 ratified (snapshot 0222) 2026-07-22 00:01:12 +02:00
project-context.md chore: initial project baseline — full Deviant codebase under version control 2026-06-13 20:38:07 +02:00
README.md chore: initial project baseline — full Deviant codebase under version control 2026-06-13 20:38:07 +02:00
tsconfig.json chore: initial project baseline — full Deviant codebase under version control 2026-06-13 20:38:07 +02:00
usdm-historical.json chore: checkpoint working tree — shell Tier-B retirement + accumulated WIP 2026-06-17 01:01:37 +02:00

Deviant

BCH two-tier token economy platform. Pre-implementation. See BCH_Token_Economy_Concept_Paper.md for the full design.

Status

Bootstrap snapshot — protocol swap mechanism is the validation target.

Project map

Path Purpose
BCH_Token_Economy_Concept_Paper.md Architecture spec, all [PROPOSED] claims
CLAUDE.md Working agreement for Claude sessions
src/ TypeScript wallet + token logic
contracts/ CashScript source for Architecture A contracts
test/ Unit tests (regtest) + integration plan (chipnet, mainnet)
scripts/ Code-scan, snapshot, compile helpers
wiki/ Living docs: architecture, decisions, testing strategy, code map
snapshots/ Numbered progress snapshots

Quickstart

npm install
npm run compile:contracts   # produces artifacts from contracts/*.cash
npm run test:regtest        # runs regtest suite
npm run scan                # regenerates wiki/code-map.md
npm run snapshot            # appends a new snapshot

Build priorities (active)

  1. Protocol swap mechanism — most novel claim, needs validation first.
  2. CashScript enforcement on mainnet — not just theoretical verification.
  3. tokenId correlation across A/B tiers — edge cases expected.

See wiki/testing-strategy.md for the staged regtest → chipnet → mainnet plan.