6d63482c48
Add the new x/cover module (Cover Pool runtime) implementing P1 of the v0.7 milestone: CoverPool/CoverFeeTag/CoverCall types with the 4 GRILL- ratified locked consts (CoverReserveFloorAnnualContribX=1.5, CoverReserveCeilingAnnualContribX=2.5, CoverStandingGateTrusted=4.0, CoverStandingGatePreferred=4.5), the 8-category/3-phase CoverCategory enum with D-086 FactoryAllowedPhases=[Phase2]-only default, three Msg* types (LaunchCoverPool/RouteCoverFee/FileCoverCall) with full sdk.Msg impls, store-backed Keeper with 4 G-003 expected-keeper shims (StandingKeeper/WatcherKeeper/BondKeeper/StillKeeper), and three handlers enforcing the D-077 Standing gate, D-086 category phase check, REQ-047 reserve floor + below-floor auto-pause (D-089(1) Still invocation), and REQ-050 category-tag match. Add the x/cover/firewall subpackage (Anti-Crowding-Out firewall, D-079/ D-088): a stdlib-only leaf checker enforcing RightNoTaxOnPersonalStash by rejecting Cover-Fee routing to the Root-Pool operating-expenses destination (defense in depth with the lexicon meta-test). Add the lexicon_meta_cover meta-test (4th lexicon firewall, D-088): scans x/cover/**/*.go for both lexicon.FindBannedTerm (10 project-wide terms) AND lexicon.FindCoverBannedTerm (4 Cover-specific terms), with G-013 walk-coverage + G-009 self-test tables. Add lexicon.CoverBannedTerms()/FindCoverBannedTerm()/ SyntheticCoverBannedStrings() helpers (additive to the existing project-wide BannedTerms — no changes to existing helpers). Apply D-088(3) optional doc-fix: replace 'insurance-like' with 'Cover-like' in x/pact/types docstrings. Coverage: x/cover/types 97.8%, x/cover/keeper 94.1%, x/cover/firewall 100.0%. go.mod/go.sum unchanged (G-006/G-028). All existing tests pass. REQs: REQ-046, REQ-047, REQ-049, REQ-050 ---ci--- project: oy phase: 1 milestone: v0.7 status: execute ---/ci---
Component 1: OY Chain & Mirror — Phase 1 Skeleton
Status
v0.0.1 — skeleton with type definitions and locked-constant tests
Vision References
- §7: Architecture — Three Layers and the Mirror
- §3: Still/Stir (pause/resume)
Modules
x/watcher — Watcher Bond & Attestation Quorum
types.Watcher— bonded Watcher (§7: 100,000 Bread minimum bond)types.Attestation— daily reserve snapshot signed by a Watchertypes.ReserveSnapshot— off-chain reserve state (off-chain total, on-chain Bread, basket breakdown)types.QuorumStatus— QuorumMet / QuorumLost / StaleEpochtypes.SlashReason— InsufficientBond / StaleAttestation / GeographicCollusion / Forgery
Locked constants (§7):
MinBond = 100000(100,000 Bread)Quorum = 6(6-of-9)MaxWatchers = 9AttestationEpochHours = 24(daily)
x/mirror — Reserve Ratio Publication
types.NavPerBread— Net Asset Value per Bread (§4.2)types.ReserveRatio— real-time published ratio with quorum flag
x/still — Pause/Resume (Still/Stir)
types.StillState— StirActive / StillPaused (§3)types.StillReason— CouncilVote / QuorumLost / SecurityAlerttypes.StillRecord— tracks pause events- Auto-still on quorum lost (§4.2: Forge/Fold blocked until quorum restored)
Tests
12 tests, all passing:
- Watcher: MinBond, Quorum, MaxWatchers, AttestationEpoch, DefaultParams (5)
- Still: DefaultStillState, AutoStillOnQuorumLost, StillStates (3)
- Mirror: DefaultPublishInterval, ModuleName, NavPerBreadStruct, ReserveRatioQuorum (4)
What's NOT in this skeleton (deferred to P1 completion)
- Cosmos SDK app.go full integration (requires SDK v0.50+ dependency resolution)
- Keeper implementations (BondWatcher, SubmitAttestation, VerifyQuorum, SlashWatcher)
- CLI commands (oyd tx watcher bond, oyd query watcher quorum)
- Proto definitions (Buf-generated types)
- CometBFT consensus setup
- Genesis import/export
Next Steps (P1 continuation)
- Resolve Cosmos SDK v0.50 dependency tree
- Implement keeper logic with store operations
- Add proto definitions and code generation
- Wire modules into app.go
- Build oyd daemon
- Integration test: 9 Watchers bond, submit attestations, verify quorum