feat(earn): scaffold Solana Earn module (SDP Markets V1) - WIP - #831
Draft
keeganthomp wants to merge 7 commits into
Draft
feat(earn): scaffold Solana Earn module (SDP Markets V1) - WIP#831keeganthomp wants to merge 7 commits into
keeganthomp wants to merge 7 commits into
Conversation
keeganthomp
force-pushed
the
earn-initial
branch
from
July 21, 2026 15:37
480991b to
62ca8c1
Compare
keeganthomp
force-pushed
the
earn-initial
branch
from
July 21, 2026 15:46
62ca8c1 to
948145d
Compare
Exploratory scaffold of the Earn deposit facility for ideation — shape review, not production wiring: - @sdp/earn domain package: EarnVaultProvider contract, fail-closed provider registry (Veda/Upshift/Perena/Ground stubs), NAV fixed-point math with unit tests - @sdp/types: earn wire DTOs + registries (source kinds, APY types, liquidity terms), earn provider family + entitlements, earn:read/ earn:write permissions, curator label registry - sdp-api: /v1/earn route family behind EARN_ENABLED (strategy catalogue, positions, movements, deposit/withdraw quotes), migration 0034 (earn_strategies/positions/movements/nav_snapshots), earn repository, provider-availability wiring incl. exit-safe withdrawal gating (assertEarnProviderConfigured) - sdp-web: /dashboard/earn behind NEXT_PUBLIC_EARN_ENABLED (default-on in local dev) — mock-data overview, 4-step deposit wizard (risk profile, strategy + curator filter, amount + yield preview, review), withdraw modal with instant vs T+n redemption semantics, pending redemptions strip; mock fixtures are the single data seam for the later swap to live /v1/earn data - docs: ADR 0002 — provider/curator pluggability, enable/disable layers, and the money-out-beats-money-off invariant Deliberately deferred: deposit/withdraw execution endpoints, webhook processors, NAV cron, OpenAPI/public-docs registration, real provider HTTP clients. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
keeganthomp
force-pushed
the
earn-initial
branch
from
July 21, 2026 16:00
948145d to
8495f4b
Compare
…ecture doc Coverage-audit follow-ups against the updated Earn product doc (partner-call notes): - Mock catalogue: add Figure PRIME (the doc's own display example), Galaxy Sweep Intraday (PYUSD deposits), and BAGEY Credit with the mixed-liquidity shape rendered as "10% intraday / rest T+2" - Known-sources registry: figure-prime, bagey, usde, aaa-clo - Withdraw modal: disclose the full-utilization edge case on instant DeFi redemptions (doc's T&C caveat) instead of overpromising - EN + FR catalogs for the new liquidity/caveat copy - docs/architecture/earn-v1-data-flow.md: mermaid system-context + deposit-sequence diagrams, source-of-truth table per surface (catalogue/NAV/positions/movements), the existing-SDP reuse map (auth, custody signing, Kora fees, RPC relay, Helius DAS, webhooks, cron, idempotency, compliance, policies, audit), net-new component list, and the no-new-indexer call for V1 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…feedback) - Rename dashboard nav to Markets with Earn nested under it (Payments-style group); move routes /dashboard/earn/* → /dashboard/markets/earn/* (+ BFF, nav-loading map, shell page config/skeletons/viewport, feature gate, EN/FR). API family stays /v1/earn (public-family rename remains the open decision). - Deposit wizard: Single strategy / Split allocation toggle (Ground-style) — multi-select strategies with per-leg %, auto even-split, 100% validation, Distribute-evenly; confirm creates one position per leg with blended yield. - Deposit wizard: SDP wallet / BYOK funding-source toggle — BYOK takes an external Solana address (validated) with the sign-and-return helper copy; no balance ceiling, address flows through as the funding wallet. - Confirm USDC/USDG/USDT as day-one deposit stablecoins (drop USDT "?"). - Refactor wizard into deriveDeposit() + WizardStepBody to keep complexity under the biome limit. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Generalize the sidebar's sub-nav disclosure from a hardwired payments
special case to keyed groups (SUBNAV_IDS + NavItem.subnavKey): chevron
toggle, per-group open state with localStorage persistence, and
aria-expanded/aria-controls wiring now apply to any group. Markets opts
in with its single Earn child; Payments behavior is unchanged (same
storage key). Replace the Payments-specific expand/collapse aria copy
with a parameterized "{section} menu" pair in EN + FR.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
# Conflicts: # apps/sdp-web/.env.local.example # apps/sdp-web/src/components/dashboard-shell.tsx # docs/architecture/module-map.md # packages/sdp-types/src/provider-access.ts # scripts/render-wrangler-config.test.mjs # scripts/secret-keys.mjs # turbo.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Exploratory scaffold of the Earn deposit facility for ideation — shape review, not production wiring:
Deliberately deferred: deposit/withdraw execution endpoints, webhook processors, NAV cron, OpenAPI/public-docs registration, real provider HTTP clients.