Skip to content

fix: address #399, #405, #406, #407 - #459

Merged
james2177 merged 4 commits into
stellar-vortex-protocol:mainfrom
k2ghostyou:drips/399-405-406-407
Oct 2, 2026
Merged

james2177 merged 4 commits into
stellar-vortex-protocol:mainfrom
k2ghostyou:drips/399-405-406-407

Conversation

@k2ghostyou

Copy link
Copy Markdown
Contributor

Summary

fix: address #399, #405, #406, #407

What was solved

#399 — [High] Build an on-chain address-book contract for canonical protocol addresses

Add a new vortex_directory Soroban contract crate that maps canonical names to versioned addresses with timelocked propose/execute updates and an entry history, plus optional config-flag resolution hooks in settlement, the registry, and the badge so existing deployments keep working. Update CI and the deployment runbook to document bootstrap order and the new crate.

Addressed:

  • Changed: Cargo.toml
  • Implement get(name) -> (Address, version) and list() read entrypoints on the new directory contract
  • Implement timelocked propose_set / execute_set with a configurable delay and per-change events
  • Maintain a history of previous entries (name -> prior address/version) queryable on-chain

#405 — [High] Build a streaming-payments treasury contract for contributor grants

Add a new treasury_streams crate implementing a Drips/Sablier-style pull-based streaming-payments treasury contract. The treasury (fee recipient) is funded and streams tokens to grantees per-second with optional cliffs; only the timelock/governor may create or cancel streams; recipients withdraw vested funds; cancellation returns unvested funds to the sender while leaving vested funds withdrawable. Includes precision-safe per-second vesting, per-action events, edge-case handling (rounding dust swept on final withdrawal, zero-duration streams, contract recipients), and a proptest invariant that vested + unvested always equals the deposit.

Addressed:

  • Changed: Cargo.toml, treasury_streams/Cargo.toml, treasury_streams/src/lib.rs, treasury_streams/Cargo.toml
  • Implement create_stream(sender, recipient, token, total, start, cliff, end) with per-stream escrow accounting.
  • Implement withdraw(recipient) as a pull-based withdrawal of vested funds.
  • Implement cancel(stream_id) where unvested funds return to the sender and vested funds remain withdrawable by the recipient.

#406 — [High] Build a fee-router contract that splits protocol revenue by governance-set weights

Add a new fee_router/ Soroban crate implementing a pull-based fee recipient that accumulates per-token balances and distributes them to governance-configured sinks according to timelocked weights (summing to 10,000 bps), with per-token accounting, a max sink count, dust-to-first-sink rounding, and failure isolation via claimable[sink][token] so rejecting sinks don't revert the whole distribution. Include deployment docs and a conservation proptest.

Addressed:

  • Changed: fee_router/src/lib.rs, fee_router/Cargo.toml, Cargo.toml, docs/mainnet-deployment-runbook.md
  • Create a new fee_router/ crate as the protocol fee recipient
  • distribute(token) is permissionless and pays out per governance-set weights summing to 10,000 bps
  • Timelocked weight changes (propose/apply with delay)

#407 — [High] Replace the single arbiter with an m-of-n bonded arbiter panel

Replace the single-arbiter dispute resolution with an m-of-n bonded arbiter panel: a new arbiter_panel crate that handles arbiter registration/bonding, PRNG-seeded panel selection per dispute, a voting window, and tallying that calls resolve_dispute on settlement. Settlement must accept resolutions only from the panel contract, with a timeout fallback to the existing ARBITER_WINDOW rule. Includes a full dispute lifecycle test with a collusion scenario and an updated dispute design doc.

Addressed:

  • Changed: docs/dispute-resolution-design.md, Cargo.toml
  • Create a new arbiter_panel contract crate with arbiter register and bond functionality
  • Implement random-ish panel selection per dispute derived from the ledger PRNG seeded with intent_id, documenting that it is manipulable by the ledger closer and unsuitable as a sole defence
  • Implement a voting window during which selected arbiters cast public on-chain votes

Changes

  • Cargo.toml (modify)
  • treasury_streams/Cargo.toml (create)
  • treasury_streams/src/lib.rs (create)
  • fee_router/src/lib.rs (create)
  • fee_router/Cargo.toml (create)
  • docs/mainnet-deployment-runbook.md (modify)
  • docs/dispute-resolution-design.md (modify)

Approach

  1. [High] Build an on-chain address-book contract for canonical protocol addresses #399 — [High] Build an on-chain address-book contract for canonical protocol addresses (Changed: Cargo.toml)
  2. [High] Build a streaming-payments treasury contract for contributor grants #405 — [High] Build a streaming-payments treasury contract for contributor grants (Changed: Cargo.toml, treasury_streams/Cargo.toml, treasury_streams/src/lib.rs, treasury_streams/Cargo.toml)
  3. [High] Build a fee-router contract that splits protocol revenue by governance-set weights #406 — [High] Build a fee-router contract that splits protocol revenue by governance-set weights (Changed: fee_router/src/lib.rs, fee_router/Cargo.toml, Cargo.toml, docs/mainnet-deployment-runbook.md)
  4. [High] Replace the single arbiter with an m-of-n bonded arbiter panel #407 — [High] Replace the single arbiter with an m-of-n bonded arbiter panel (Changed: docs/dispute-resolution-design.md, Cargo.toml)

Issues

Closes #399
Closes #405
Closes #406
Closes #407

@drips-wave

drips-wave Bot commented Sep 30, 2026

Copy link
Copy Markdown

@k2ghostyou 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! 🚀

Learn more about application limits

@james2177
james2177 merged commit 24c4a37 into stellar-vortex-protocol:main Oct 2, 2026
4 of 24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants