Multi-asset bonding surface for $MYCO token issuance with commitment-based minting channels
Go to file
Jeff Emmett c48b7ae82a feat: add cadCAD simulation, risk tranches, cross-chain, and conviction governance
- Add risk_tranching.py: Senior/Mezzanine/Junior tranche system with yield
  waterfall, loss absorption, and liquidation mechanics
- Add conviction.py: Full conviction voting engine for parameter governance
  (ported from conviction/ research repo)
- Add crosschain/hub_spoke.py: 5-chain hub-spoke simulation with CCIP messaging,
  staking yield, and price shock modeling
- Add cadcad/ module: State definitions, 7 policy functions, 7 state update
  functions, pre-built scenarios (normal growth, stress test, parameter sweep)
- Add 4 dashboard tabs: Cross-Chain map, Risk Tranches, Governance, cadCAD Sim
- Wire cadCAD 0.5.3 with pandas/networkx/seaborn as new dependencies
- All 350 existing tests still pass

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-03 12:11:15 -07:00
dashboard feat: add cadCAD simulation, risk tranches, cross-chain, and conviction governance 2026-04-03 12:11:15 -07:00
docs docs: add CRDT-native primitives design — mapping DeFi to off-chain tokens 2026-04-01 10:33:29 -07:00
notebooks feat: add CLI, dashboard, notebook, and CRDT bridge (350 tests) 2026-04-01 14:14:39 -07:00
reference feat: complete MYCO bonding surface system — math specs, simulations, and tests 2026-04-01 00:12:00 -07:00
src feat: add cadCAD simulation, risk tranches, cross-chain, and conviction governance 2026-04-03 12:11:15 -07:00
tests feat: add CLI, dashboard, notebook, and CRDT bridge (350 tests) 2026-04-01 14:14:39 -07:00
.dockerignore feat: add System Config tab, presets, JSON export/import, and Dockerize for simulate.rspace.online 2026-04-01 14:55:14 -07:00
.gitignore feat: complete MYCO bonding surface system — math specs, simulations, and tests 2026-04-01 00:12:00 -07:00
.gitleaksignore feat: complete MYCO bonding surface system — math specs, simulations, and tests 2026-04-01 00:12:00 -07:00
Dockerfile fix: set PYTHONPATH=/app in Dockerfile for dashboard imports 2026-04-01 15:38:31 -07:00
README.md feat: complete MYCO bonding surface system — math specs, simulations, and tests 2026-04-01 00:12:00 -07:00
docker-compose.yml fix: add Traefik priority to avoid rspace wildcard conflict 2026-04-01 15:04:39 -07:00
pyproject.toml feat: add cadCAD simulation, risk tranches, cross-chain, and conviction governance 2026-04-03 12:11:15 -07:00

README.md

MYCO Bonding Surface

Multi-asset bonding surface for $MYCO token issuance, combining N-dimensional ellipsoidal pricing with commitment-based minting channels and Gyroscope-inspired reserve management.

Architecture

                    ┌─────────────────────┐
                    │   $MYCO Token Mint   │
                    └─────────┬───────────┘
                              │
              ┌───────────────┼───────────────┐
              ▼               ▼               ▼
    ┌─────────────┐  ┌──────────────┐  ┌────────────┐
    │  Financial   │  │ Commitment   │  │  Staking   │
    │  Reserves    │  │  Channels    │  │  Lockups   │
    │ (N assets)   │  │ (labor/sub)  │  │ (duration) │
    └──────┬──────┘  └──────┬───────┘  └─────┬──────┘
           │                │                │
    ┌──────▼──────┐  ┌──────▼───────┐  ┌─────▼──────┐
    │ Ellipsoid   │  │ Contribution │  │ Time-weight │
    │ Bonding     │  │ Oracle /     │  │ Multiplier  │
    │ Surface     │  │ Attestation  │  │ Curve       │
    │ (N-CLP)     │  │              │  │             │
    └──────┬──────┘  └──────┬───────┘  └─────┬──────┘
           │                │                │
           ▼                ▼                ▼
    ┌─────────────────────────────────────────────┐
    │           Reserve Tranching Layer            │
    │  (target weights, safety checks, rebalance)  │
    └──────────────────┬──────────────────────────┘
                       │
              ┌────────▼────────┐
              │  P-AMM Redemption│
              │  Curve + Flow    │
              │  Dampening       │
              └─────────────────┘

What This Is

A research/simulation repo exploring advanced token issuance mechanics drawn from:

  • Balancer — Weighted constant product, StableSwap, concentrated liquidity, GradualValueChange, StableSurge fees
  • Gyroscope — E-CLP elliptical curves, P-AMM redemption, reserve tranching, flow dampening

The system extends these DeFi primitives into an N-dimensional bonding surface where $MYCO can be minted via:

  1. Financial deposits (ETH, USDC, DAI, ...) priced on an ellipsoidal invariant surface
  2. Labor contributions — proof-of-contribution attestations converted to tokens at governed rates
  3. Subscriptions — recurring pledges with loyalty multipliers
  4. Staking lockups — time-weighted bonus minting with concave (sqrt) reward curves

Primitives

# Primitive Source Purpose
1 Weighted Product Balancer N-asset constant product invariant
2 StableSwap Curve/Balancer Stable-pegged invariant (Newton solver)
3 Concentrated 2-CLP Gyroscope Virtual-reserve concentrated liquidity
4 Elliptical CLP Gyroscope A-matrix elliptical pricing
5 N-D Ellipsoid Surface Novel Generalized N-asset bonding surface
6 Reserve Tranching Gyroscope GYD Multi-vault weight targets + safety
7 P-AMM Redemption Gyroscope Backing-ratio-dependent redemption pricing
8 Dynamic Weights Balancer/QuantAMM Time-varying parameters + oracle multipliers
9 Flow Dampening Gyroscope Anti-bank-run exponential outflow memory
10 Imbalance Fees Balancer StableSurge Median-based surge fees
11 Commitment Issuance Novel Labor, subscription, staking channels

Each primitive has a math spec in docs/ and a Python simulation in src/primitives/ or src/commitments/.

Quick Start

# Install
pip install -e ".[dev]"

# Run tests (128 tests)
pytest tests/

# Run a simulation
python -c "
from src.composed.simulator import scenario_token_launch
result = scenario_token_launch(n_assets=3, n_depositors=50, duration=90)
print(f'Final supply: {result.supply[-1]:.2f}')
print(f'Final reserve: {result.reserve_value[-1]:.2f}')
print(f'Backing ratio: {result.backing_ratio[-1]:.4f}')
"

Project Structure

myco-bonding-curve/
├── docs/                    # Math specifications (0012)
├── src/
│   ├── primitives/          # Core invariants and mechanisms
│   ├── commitments/         # Labor, subscription, staking channels
│   ├── composed/            # Full MycoSystem + simulator
│   └── utils/               # Fixed-point, Newton solver, linear algebra
├── notebooks/               # Interactive exploration
├── reference/               # Existing Solidity contracts (read-only)
└── tests/                   # 128 property-based tests

Key Invariants

  1. supply >= 0 — never negative supply
  2. reserve_value >= 0 — never negative reserves
  3. redemption_amount <= reserve_value — never return more than exists
  4. sum(vault_weights) == 1.0 — weights always normalized
  5. flow_tracker.current_flow >= 0 — flow tracking non-negative
  6. commitment_minted <= cap * supply — commitment channels capped

Relationship to payment-infra

This repo sits alongside payment-infra (which has the existing polynomial bonding curve + USDC reserve). This is the research/advanced design track exploring multi-asset surfaces and commitment-based issuance. Both repos coexist.

Dependencies

  • Python >= 3.11
  • numpy, scipy, matplotlib, sympy
  • pytest, jupyter (dev)