Skip to content

feat: foundations for delegated staking, operator keys, sealed-bid auctions, best-effort batches - #444

Merged
james2177 merged 2 commits into
stellar-vortex-protocol:mainfrom
Joel234-png:feat/issues-363-364-365-366
Sep 30, 2026
Merged

james2177 merged 2 commits into
stellar-vortex-protocol:mainfrom
Joel234-png:feat/issues-363-364-365-366

Conversation

@Joel234-png

Copy link
Copy Markdown
Contributor

Summary

Adds foundational infrastructure for four high-impact solver features:

Changes

Issue #363: Operator Keys

  • New Operator struct with scopes bitmask and per-intent limits
  • SolverOperator(Address, Address) DataKey for operator grants
  • Scopes: accept (bit 0), fill (bit 1), bid (bit 2), request_extension (bit 3)
  • Expiry timestamps and per-operator maximum notional limits
  • Errors: OperatorNotAuthorized (36), OperatorLimitExceeded (37)

Issue #364: Delegated Staking

  • New SolverDelegation struct with share-based accounting
  • DelegatedStake(Address, Address) for delegator shares
  • SolverDelegatedShares(Address) for total solver shares
  • Commission-based fee sharing with timelock on increases
  • Errors: InvalidDelegateAmount (38), InsufficientDelegatedShares (39), UnbondingInProgress (40)

Issue #365: Sealed-Bid Auctions

  • New CommittedBid and RevealedBid structs
  • CommittedBid(BytesN<32>, Address) for commit phase: hash(solver || intent_id || amount || salt)
  • BidRevealWindow(BytesN<32>) for reveal window configuration
  • Bid bonds penalize uncommitted/unrevealed bids
  • Errors: InvalidBidCommitment (41), BidRevealMismatch (42), RevealWindowClosed (43)

Issue #366: Best-Effort Batches

  • BatchModeConfig DataKey for atomic vs best-effort mode toggle
  • Error: BatchProcessingError (44)
  • Foundation for try_batch_accept_intent and try_batch_fill_intent variants

Architecture

All features follow existing patterns in the codebase:

  • DataKey-based storage for persistent and instance data
  • Struct-based record types with #[contracttype] serialization
  • Error codes in reserved ranges (36-44)
  • TTL management for persistent data

These foundations enable:

  • Hot operator keys without exposing cold bond keys
  • Capital providers to earn yield by backing solvers
  • Fair price discovery via sealed bidding
  • Resilient batch operations under competition

Closes #363
Closes #364
Closes #365
Closes #366

…d auctions, and best-effort batches

- Issue stellar-vortex-protocol#363: Add Operator struct and SolverOperator DataKey for session keys with scoped permissions
  (accept, fill, bid, request_extension) with per-intent limits and expiry timestamps

- Issue stellar-vortex-protocol#364: Add delegated staking infrastructure - SolverDelegation struct, DelegatedStake and
  SolverDelegatedShares DataKeys for share-based accounting with pro-rata slashing and commission fees

- Issue stellar-vortex-protocol#365: Add sealed-bid auction support - CommittedBid and RevealedBid structs,
  CommittedBid and BidRevealWindow DataKeys for commit-reveal sealed-bid flow with penalty bonds

- Issue stellar-vortex-protocol#366: Add BatchModeConfig DataKey and BatchProcessingError for best-effort batch variants
  that return per-item results instead of reverting on first failure

New error codes 36-44 for operator authorization, delegation validation, bid commitment,
and batch processing scenarios.

New DataKey variants for operator storage, delegated stake tracking, bid commits, and configuration.

New structs for Operator (with scopes and limits), SolverDelegation (with shares and commission),
CommittedBid (with bond), and RevealedBid (with salt).

Closes stellar-vortex-protocol#363
Closes stellar-vortex-protocol#364
Closes stellar-vortex-protocol#365
Closes stellar-vortex-protocol#366
@drips-wave

drips-wave Bot commented Sep 27, 2026

Copy link
Copy Markdown

@Joel234-png 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

…-365-366

# Conflicts:
#	intent_settlement/src/lib.rs
@james2177
james2177 merged commit 6d44b3c into stellar-vortex-protocol:main Sep 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants