- Add System Config tab with ~15 parameter sliders grouped in accordions - Add 4 named presets (Conservative, Balanced, Aggressive, High-Risk) - Add JSON config export/import for sharing configurations - All tabs now read config from session_state instead of hardcoding - Signal Router uses config's fee/flow params as base AdaptiveParams - Multi-stage Dockerfile (Python 3.12-slim, non-root, healthcheck) - docker-compose.yml with Traefik labels for simulate.rspace.online Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| dashboard | ||
| docs | ||
| notebooks | ||
| reference | ||
| src | ||
| tests | ||
| .dockerignore | ||
| .gitignore | ||
| .gitleaksignore | ||
| Dockerfile | ||
| README.md | ||
| docker-compose.yml | ||
| pyproject.toml | ||
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:
- Financial deposits (ETH, USDC, DAI, ...) priced on an ellipsoidal invariant surface
- Labor contributions — proof-of-contribution attestations converted to tokens at governed rates
- Subscriptions — recurring pledges with loyalty multipliers
- 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 (00–12)
├── 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
supply >= 0— never negative supplyreserve_value >= 0— never negative reservesredemption_amount <= reserve_value— never return more than existssum(vault_weights) == 1.0— weights always normalizedflow_tracker.current_flow >= 0— flow tracking non-negativecommitment_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)