A single-event, fully-backed parametric insurance pool. Underwriters deposit capital and earn
premiums; buyers purchase coverage that pays out iff a trusted assessor later confirms the covered
event fired. Coverage sold is always <= capital, so every payout is fully collateralized — no
undercollateralized promises. Etherisc/Nexus-style, minimal (an attested boolean outcome, no oracle price
feed, no bonding curve). MIT.
- OPEN (until
coverageEnd):depositCapital(amount)— underwrite; your capital backs coverage and earns premiums.buyCoverage(coverage)— paycoverage * premiumRateBps / 1e4; revertsUndercollateralizedif it would push total coverage past the capital backing it.
resolve(triggered)— the assessor attests the outcome aftercoverageEnd, one-shot. Fixes the underwriter pool =capital + premiums − (triggered ? coverageSold : 0).claim()— a buyer collects their coverage payout only if the event fired.withdrawCapital()— an underwriter takes their pro-rata (by deposit) share of the underwriter pool.
If the event fires, buyers are paid and underwriters share the loss (net of the premiums they keep); if it doesn't, underwriters keep their capital plus all premiums.
- Solvency — the pool always holds at least every outstanding obligation, across the full lifecycle (deposit / buy / resolve / claim / withdraw, 12,800 calls, 0 reverts): all capital + premiums before resolution; unclaimed coverage + un-withdrawn underwriter shares after. Because coverage is capped at capital, all payouts are backed and total in == total out. Mutation-checked (removing the backing check fails the over-capacity test); reentrancy-safe; fee-on-transfer-safe deposits.
- The assessor is trusted to attest the outcome truthfully — that's the oracle assumption of any parametric cover (wire it to a real oracle/committee in production). No admin path to funds beyond the defined claim/withdraw. Fixed premium rate, single event, no partial/early exit — deliberately minimal. Standard ERC-20 assumed. Unaudited reference implementation.
forge test # 12 tests: deposit/buy, triggered vs not, multi-LP pro-rata, multi-buyer conservation, solvency invariant