Repository navigation
Add per-vault delta-hedging policy and hedge P&L attribution - #358
Merged
Merged
Conversation
…r Vault-Written O Closes Zenith-options#297
…L Pipeline for Ep Closes Zenith-options#298
… IDs Across Vault Closes Zenith-options#299
… LP Shares With N Closes Zenith-options#300
|
@jhayniffy Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
- src/env.ts: merged [markers] — model resolved the conflict markers - src/lib/api/vaults.ts: merged [markers] — model resolved the conflict markers - src/lib/pricing.ts: merged [markers] — model resolved the conflict markers Co-authored-by: Simple Agent <agent@simple.dev>
- src/lib/api/vaults.ts: merged [markers] — model resolved the conflict markers Co-authored-by: Simple Agent <agent@simple.dev>
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.
Summary
Add per-vault delta-hedging policy and hedge P&L attribution
What was solved
#297 — Implement Dynamic Delta-Hedging Automation for Vault-Written Option Positions
Add an optional, per-vault delta-hedging policy for option-writing vaults: define the policy object (enabled, delta band, instrument, max notional, cadence, kill switch), compute vault-level Greeks from open written positions via the shared pricing library, route hedge orders through a dedicated execution path separate from option sales, persist hedge trades in the epoch ledger with hedge P&L attributed separately from option premium, and surface hedge status/P&L through the vaults API. Hedging must be idempotent, keeper-driven with on-chain bounds enforcement, fail safe on stale/missing price feeds, rate-limited against churn, disableable mid-epoch without book inconsistency, and must never violate collateral custody rules.
Addressed:
#298 — Build a Vault Data Warehouse and Analytics ETL Pipeline for Epoch, Flow, and Strategy Metrics
Add a vault analytics ETL pipeline: warehouse schemas (vault registry snapshots, epoch facts, flow facts, share-price series, redemption-queue depth), idempotent replayable ETL jobs with indexer-cursor watermarking, versioned analytical views, and data-quality checks that fail loudly. Deliver as backend vault service modules plus docs and CI wiring, without touching depositor-facing charts or frontend telemetry.
Addressed:
#299 — Implement Distributed Tracing and Correlation IDs Across Vault Services, the Indexer, and Contract Calls
Instrument the Phase 2 vault stack with OpenTelemetry-style distributed tracing and a shared correlation-ID convention spanning frontend deposit/withdraw requests, BFF routes, the vault backend, the event indexer, keeper epoch transitions, and Soroban transaction submission. The correlation ID must propagate through BFF headers, backend request context, async job payloads, and on-chain memo/metadata where the wallet flow permits, be surfaced in structured logs and error responses, and be recorded on idempotency records so replays link to the original trace. Trace export wires to the existing observability backend with a sampling policy that never drops error traces.
Addressed:
#300 — Build a Secondary Transfer Facility for Vault LP Shares With NAV-Based Pricing and Order Matching
Add a NAV-anchored secondary transfer facility for vault LP shares: off-chain order store with on-chain atomic settlement, price bounded by a configurable band around attested NAV, expiry/nonce/replay protection, compliance/lockup/eligibility gating, cancellability, and a discoverable order surface in the vault UI. Scope excludes a full on-chain matching engine with maker/taker rebates and any redemption-queue changes.
Addressed:
Changes
src/lib/pricing.ts(modify)src/lib/api/vaults.ts(modify)contracts/fixtures/AggregateGreeksSchema.json(modify)docs/LEDGER.md(modify)src/env.ts(modify)Approach
Issues
Closes #297
Closes #298
Closes #299
Closes #300