BURN ENGINE ACTIVE
·
LUMINA / USDC$0.0364+2.31%
·
BURNED 1,284,402 LUMINA
·
ACTIVE BETS 312
·
BASE L2 OK
·
CHAINLINK OK
Open source · public on GitHub · V5.1

📚 Documentation

Every contract, every endpoint, every audit — public on GitHub. Browse by category below or jump straight to the org.

Open source · public on GitHub
View all repos on GitHub
3 repositories: smart contracts, REST API, and this frontend — all open source.
org-lumina

🚀 Getting Started

First steps and quick guides for users, developers, and AI agents
3 docs

Protocol README

High-level overview of the Lumina parametric insurance protocol and how the V5.1 contracts fit together.

LUMINA-PROTOCOLOpen on GitHub

API server README

How to run the lumina-api locally, environment variables, and the public + agent endpoint surface.

lumina-apiOpen on GitHub

AI Agent Quick Start

Five-minute path from zero to first policy purchase via the API. Read this before anything else if you operate a bot.

LUMINA-PROTOCOLOpen on GitHub

🤖 For AI Agents

Integration guides and skill files for autonomous agents
6 docs

SKILL spec (canonical)

The full canonical skill specification consumed by AI agents. Lists every operation an agent can perform.

LUMINA-PROTOCOLOpen on GitHub

Configure API client

Env vars, base URL, x-api-key header, retry strategy. The setup any agent needs before calling other endpoints.

lumina-apiOpen on GitHub

Generate API key

How to obtain an agent API key (admin-only today, self-service on roadmap). Format, storage, rate limits.

lumina-apiOpen on GitHub

Buy policy as Agent

Relayer pattern: agent posts an authenticated request; the API pays gas and calls purchasePolicyFor on-chain.

lumina-apiOpen on GitHub

Redeem matured bond via API

Agent-side BondVault.redeemBond — POST /api/v1/redeem with epochId + usdAmount. Returns LUMINA to the holder.

lumina-apiOpen on GitHub

Health check

Public unauthenticated endpoint for monitors and uptime probes. Use it on startup before issuing real calls.

lumina-apiOpen on GitHub

📜 Smart Contracts (source)

Every deployed Solidity file on GitHub — token, bonds, shields, oracles, marketplace
29 docs

LuminaTokenV2.sol

ERC-20 + ERC-20Burnable + UUPS proxy. 100M fixed supply, no mint, BURNER_ROLE for TWAPBurner.

LUMINA-PROTOCOLOpen on GitHub

FounderVesting.sol

8M LUMINA locked behind 2-of-3 AltSeason conditions sustained 7 days, then 3 tranches every 31 days. 4-year fallback.

LUMINA-PROTOCOLOpen on GitHub

TreasuryVesting.sol

3M LUMINA, 180-day lock then max 250k/month drip release. UUPS upgradeable.

LUMINA-PROTOCOLOpen on GitHub

BondVault.sol

Single ERC-1155 vault holding the 70M LUMINA reserve. Backs every claim payout in the protocol.

LUMINA-PROTOCOLOpen on GitHub

ClaimBond.sol

ERC-1155 bond representation. 1 token = $1 face value (integer dollars, not 6-dec USDC).

LUMINA-PROTOCOLOpen on GitHub

PolicyManagerV2.sol

Buy / redeem / cancel policies. Computes premium = cover × payoutRatio × triggerProb × margin.

LUMINA-PROTOCOLOpen on GitHub

CoverRouterV2.sol

Routes premium USDC into the TWAPBurner and updates capacity counters atomically.

LUMINA-PROTOCOLOpen on GitHub

TWAPBurner.sol

Receives USDC from premiums + marketplace fees, executes multi-DEX buy & burn of LUMINA. Adaptive distribution.

LUMINA-PROTOCOLOpen on GitHub

AdaptiveFeeDistributor.sol

Dynamic 4-bucket distribution (burn / buyback / ops / maintenance) consumed by TWAPBurner when adaptive mode is on.

LUMINA-PROTOCOLOpen on GitHub

LuminaBondMarketplace.sol

Secondary marketplace for bonds. 3% fee on every trade routes back through TWAPBurner.

LUMINA-PROTOCOLOpen on GitHub

BuybackEngine.sol

Commit-reveal MEV-protected buyback executor. Pulls from buybackReserve when conditions trigger.

LUMINA-PROTOCOLOpen on GitHub
new

LuminaOracleV2.sol

EIP-712 signed price proofs from the off-chain signer. Verifies signatures against the trusted oracleKey. The 9 V5.1 shields call verifyPriceProofEIP712 here in their _doVerifyAndCalculate path. Replaces the pre-launch MockShieldOracle.

LUMINA-PROTOCOLOpen on GitHub

CapacityOracle.sol

Reads available BondVault capacity in USD using a 1h TWAP of LUMINA price (not spot — anti-MEV).

LUMINA-PROTOCOLOpen on GitHub

SolvencyOracle.sol

Monitors the BondVault solvency floor (125%). Used by burnFromReserves to block insolvent burns.

LUMINA-PROTOCOLOpen on GitHub

ShieldKeeper.sol

Chainlink Automation keeper that expires policies and triggers payouts when oracle conditions are met.

LUMINA-PROTOCOLOpen on GitHub

UniswapV3Adapter.sol

IDexRouter implementation for Uniswap V3. Used by TWAPBurner for the primary buy & burn route.

LUMINA-PROTOCOLOpen on GitHub

AerodromeAdapter.sol

IDexRouter implementation for Aerodrome (Base-native DEX). Sequential fallback if Uniswap leg fails.

LUMINA-PROTOCOLOpen on GitHub

BaseShield.sol

Abstract base for every shield product. Holds shared payout, pause, and replay-protection logic.

LUMINA-PROTOCOLOpen on GitHub

FlashBTCShield1h.sol

Flash crash protection for BTC over a 1-hour window. Triggers on % drop vs reference price.

LUMINA-PROTOCOLOpen on GitHub

FlashBTCShield4h.sol

Flash crash protection for BTC over a 4-hour window.

LUMINA-PROTOCOLOpen on GitHub

FlashBTCShield24h.sol

Flash crash protection for BTC over a 24-hour window.

LUMINA-PROTOCOLOpen on GitHub

FlashBTCShield48h.sol

Flash crash protection for BTC over a 48-hour window.

LUMINA-PROTOCOLOpen on GitHub

FlashETHShield1h.sol

Flash crash protection for ETH over a 1-hour window.

LUMINA-PROTOCOLOpen on GitHub

FlashETHShield24h.sol

Flash crash protection for ETH over a 24-hour window.

LUMINA-PROTOCOLOpen on GitHub

FlashETHShield48h.sol

Flash crash protection for ETH over a 48-hour window.

LUMINA-PROTOCOLOpen on GitHub

MicroDepegShield.sol

Micro-depeg protection for USDT (and similar). Triggers on small but sustained price deviation.

LUMINA-PROTOCOLOpen on GitHub

RateShockShield.sol

Rate-shock protection — triggers when Aave V3 USDC borrow rate exceeds 10% APY.

LUMINA-PROTOCOLOpen on GitHub

CEXLiquidityReserve.sol

Holds the 14M LUMINA earmarked for CEX/DEX liquidity provisioning at launch.

LUMINA-PROTOCOLOpen on GitHub

MaintenanceReserve.sol

Receives the maintenance bucket from TWAPBurner adaptive distribution. Funds operational upkeep.

LUMINA-PROTOCOLOpen on GitHub

🔐 Architecture & Integrations

How the contracts connect — integration maps, Aave dependency, audit deep-dives
3 docs
new

Aave V3 integration

How V5.1 uses Aave V3 read-only as price oracle (RateShockShield + FounderVesting Condition C). NOT for yield.

LUMINA-PROTOCOLOpen on GitHub

Cross-contract integration map

How the 9 shields, BondVault, ClaimBond, and CoverRouterV2 connect. Auditor reference.

LUMINA-PROTOCOLOpen on GitHub

Aave audit chapter

Audit deep-dive on the Aave V3 integration. Covers manipulation surfaces and 2-of-3 mitigation in FounderVesting.

LUMINA-PROTOCOLOpen on GitHub

🛡️ Security & Audits

Security model, audit reports, threat analysis
5 docs
new

Security policy

Reporting process, scope, bug bounty, V5.1 contracts in scope (single BondVault + 9 shields), Aave dependency.

LUMINA-PROTOCOLOpen on GitHub

Security audit V5

Latest internal audit report covering V5.1 architecture (renamed from SECURITY-AUDIT-V4 — content was already V5.1).

LUMINA-PROTOCOLOpen on GitHub

Phase 4 audit report

Phase 4 internal audit covering the bond + marketplace flow.

LUMINA-PROTOCOLOpen on GitHub

Threat model

Adversarial framing — who can attack what, oracle manipulation surfaces, governance assumptions.

LUMINA-PROTOCOLOpen on GitHub

Anti-fraud playbook

Operational guide for detecting and responding to abuse patterns (spam policies, oracle manipulation attempts).

LUMINA-PROTOCOLOpen on GitHub

🚢 Deployment

Deploy checklists, env config, mainnet runbooks
4 docs

Deploy V5 checklist

Pre-deploy invariants and post-deploy verification for the V5.x family of contracts.

LUMINA-PROTOCOLOpen on GitHub

Deploy V5 order

Exact deployment sequence (token → vault → router → shields) with rationale for ordering.

LUMINA-PROTOCOLOpen on GitHub

Environment variables

All env vars needed for deploy + post-deploy. Includes the Aave V3 oracle address (read-only).

LUMINA-PROTOCOLOpen on GitHub

Mainnet deploy runbook

Step-by-step runbook for the production mainnet deployment, including go/no-go gates.

LUMINA-PROTOCOLOpen on GitHub

⚖️ Governance & Operations

Roles, access control, multisig policies, incident response
5 docs

Access control matrix

Every privileged role across the protocol — who can call what, who holds the keys, with rotation policies.

LUMINA-PROTOCOLOpen on GitHub

Roles and responsibilities

Governance + operational roles defined: who signs what, decision frameworks, escalation paths.

LUMINA-PROTOCOLOpen on GitHub

Multisig policies

Signing thresholds, quorum, timelocks, and key rotation for the governance multisig.

LUMINA-PROTOCOLOpen on GitHub

Daily operations runbook

Day-to-day operator tasks: monitoring, periodic verifications, alerts triage.

LUMINA-PROTOCOLOpen on GitHub

Incident response runbook

Step-by-step guide for triaging and recovering from production incidents (RPC down, oracle stale, contract pause).

LUMINA-PROTOCOLOpen on GitHub

📊 Tokenomics & Economics

Token distribution, burn mechanics, premium math, vesting
9 docs

Token distribution (100M LUMINA)

The five _mint() calls in LuminaTokenV2.initialize() that hardcode the 70 / 14 / 8 / 5 / 3 split (BondVault / CEX / Founder / LBP / Treasury).

LUMINA-PROTOCOLOpen on GitHub

Max supply + burn role

MAX_SUPPLY constant (100M × 1e18, fixed, no mint function) and the BURNER_ROLE granted only to the TWAPBurner contract.

LUMINA-PROTOCOLOpen on GitHub

Burn engine — fallback distribution

TWAPBurner default 4-bucket split when adaptive mode is off: 85% burn, 8% buyback, 5% maintenance, 2% ops (in BPS, sums to 10000).

LUMINA-PROTOCOLOpen on GitHub

Premium formula

CoverRouterV2.purchasePolicy: premium = coverage × payoutRatioBps × triggerProbBps × marginBps / 10000³, with a 1-unit USDC ($0.000001) floor.

LUMINA-PROTOCOLOpen on GitHub

Founder vesting (8M LUMINA)

All FounderVesting constants: 8M total, 3 tranches every 31 days, 2-of-3 oracle conditions sustained 7 days (ETH/BTC > 0.050, ETH > $4k, Aave borrow > 7%), 1460-day fallback.

LUMINA-PROTOCOLOpen on GitHub

Treasury vesting (3M LUMINA)

TreasuryVesting constants: 3M total, 180-day initial lock, then max 250k/month drip release. Math floor is 18 months until fully drawn.

LUMINA-PROTOCOLOpen on GitHub

Bond face value + maturity

ClaimBond NatSpec: 1 ERC-1155 token = $1 USD at maturity (integer dollars, not 6-dec USDC). Bonds vest 100% at maturity — no partial unlock.

LUMINA-PROTOCOLOpen on GitHub

Bond maturity period (730 days)

BondVault.BOND_MATURITY_SECONDS — every newly issued bond matures exactly 730 days (24 months) after issuance.

LUMINA-PROTOCOLOpen on GitHub

Premium math — edge cases (audit)

Audit deep-dive on the premium formula: rounding behavior, integer overflow surfaces, BPS-cube precision loss. Companion analysis to the on-chain formula above.

LUMINA-PROTOCOLOpen on GitHub

🗺️ Roadmap

Future plans and milestones
1 doc

Roadmap V5

Forward-looking roadmap for the V5 family: token launch, marketplace, automation, cross-chain.

LUMINA-PROTOCOLOpen on GitHub

📜 Historical

Changelog and deprecated references — clearly marked
3 docs
historical

Changelog

Version-by-version change log. Older entries reference V1/V2/V4 by design — current architecture is V5.1.

LUMINA-PROTOCOLOpen on GitHub
deprecated

V1 deprecated contracts

Inventory of legacy V1/V2/V4 contracts no longer in scope. Kept to prevent re-deployment of stale addresses.

LUMINA-PROTOCOLOpen on GitHub
historical

Security audit V3 (final)

Historical V3 audit for reference. Most findings rolled forward into V4 and V5; check SECURITY-AUDIT-V5 for current.

LUMINA-PROTOCOLOpen on GitHub

📜 Deployed Contracts

V5.1 on Base Sepolia (chainId 84532). Every address is read from `lib/contracts.ts` — never hardcoded here.
20 docs
KIND
NAME
ADDRESS
coreLuminaTokenV20x17db465DBasescan
coreClaimBond0x5304A541Basescan
coreBondVault0x1747cf6ABasescan
corePolicyManagerV20x04f90804Basescan
coreCoverRouterV20x6044f316Basescan
coreMarketplace0x863A9D51Basescan
coreBuybackEngine0x5a7420b3Basescan
coreShieldKeeper0xB5dE6BcaBasescan
coreTWAPBurner0x357B7d99Basescan
oracleLuminaOracleV20x8cAbd194Basescan
tokenUSDC (MockUSDC)0x63D33693Basescan
shieldFlash BTC 1h0x77c2f2a9Basescan
shieldFlash BTC 4h0xb5b28122Basescan
shieldFlash BTC 24h0xAc53F99fBasescan
shieldFlash BTC 48h0xf2D395f2Basescan
shieldFlash ETH 1h0xa632a170Basescan
shieldFlash ETH 24h0x6D6EEe26Basescan
shieldFlash ETH 48h0xcCbE864DBasescan
shieldMicro Depeg USDT0x06DFd53dBasescan
shieldRate Shock0x7287Da2fBasescan