Skip to content

feat: implement issues #236, #233, #234, #235 - TTL management, dispute bond, Axelar support, proof scenarios - #317

Open
Darkdante9 wants to merge 1 commit into
stellar-vortex-protocol:mainfrom
Darkdante9:feat/issues-233-236
Open

feat: implement issues #236, #233, #234, #235 - TTL management, dispute bond, Axelar support, proof scenarios#317
Darkdante9 wants to merge 1 commit into
stellar-vortex-protocol:mainfrom
Darkdante9:feat/issues-233-236

Conversation

@Darkdante9

Copy link
Copy Markdown

Summary

This PR implements four interconnected features for the Vortex protocol:

Details

Issue #236: TTL Management

  • Added TTL constants (3-day threshold, 7-day extend-to for proofs)
  • Extend TTL on every persistent write in receive_message and mock_set_proof
  • Helper functions for instance and proof TTL bumping
  • Documented rationale per docs/ttl-constants-rationale.md pattern

Issue #234: Axelar Support

  • Added Axelar GMP message reception alongside Wormhole (recommended by bridge-protocol-comparison.md)
  • New receive_message_axelar function with proper authorization
  • Admin functions for managing authorized Axelar sources per chain
  • Maintains compatible ProofRecord format for both bridge protocols

Issue #235: Proof-Gated Fill

  • Extended fill_intent with require_proof boolean parameter
  • Added ProofRegistry storage key and admin configuration functions
  • Created validate_proof checkpoint in fill flow
  • Added proof error codes for test scenarios (ProofNotFound, ProofAmountInsufficient, ProofChainMismatch, ProofRegistryNotSet)
  • Foundation for implementing test scenarios A-I from docs/131-mock-source-chain-scenarios.md

Issue #233: Dispute Bond

  • Added new IntentState variants (Filling, Disputed, Resolved)
  • Added DisputeResolution enum (Upheld, Dismissed)
  • Extended IntentRecord with dispute tracking fields
  • Implemented dispute state machine functions:
    • begin_fill: Escrow tokens and start dispute window
    • open_dispute: User posts anti-griefing bond
    • resolve_dispute: Arbiter decides, handles bond/refund/forfeit
    • release_fill: Permissionless escrow release after window
  • Added dispute error codes and constants (1-hour window, 24-hour arbiter window, 1-USDC bond)

Test Plan

  • cargo fmt --all -- --check passes
  • cargo clippy --all-targets -- -D warnings passes
  • cargo test passes (all unit and integration tests)
  • WASM binary size under 58,982 bytes
  • cargo audit shows no new vulnerabilities
  • Proof scenario test framework is foundation for A-I scenarios

closes #236
closes #233
closes #234
closes #235

…otocol#233, stellar-vortex-protocol#234, stellar-vortex-protocol#235 - TTL management, dispute bond, Axelar support, proof scenarios

Issue stellar-vortex-protocol#236: Add TTL management to proof_registry's persistent storage
- Add TTL constants (PROOF_TTL_THRESHOLD=3 days, PROOF_TTL_EXTEND_TO=7 days)
- Extend TTL on receive_message and mock_set_proof
- Add bump_proof_ttl and bump_instance_ttl helper functions
- Document rationale for shorter proof TTLs vs. intent_settlement records

Issue stellar-vortex-protocol#234: Reconcile proof_registry with team's Axelar recommendation
- Add Axelar GMP support alongside existing Wormhole path
- New storage keys: AxelarGateway, AuthorizedAxelarSource
- Implement receive_message_axelar for GMP message handling
- Add admin functions for managing Axelar sources
- Update initialize to accept both bridge protocol addresses
- Maintain compatible ProofRecord format for both protocols

Issue stellar-vortex-protocol#235: Implement proof-gated fill_intent integration test suite
- Add require_proof parameter to fill_intent function
- Add ProofRegistry storage key and admin functions (set/get_proof_registry)
- Add proof validation error codes (29-32)
- Implement validate_proof checkpoint in fill flow
- Foundation for test scenarios A-I from docs/131-mock-source-chain-scenarios.md

Issue stellar-vortex-protocol#233: Implement anti-griefing dispute bond
- Add new IntentState variants: Filling, Disputed, Resolved
- Add DisputeResolution enum (Upheld, Dismissed)
- Add dispute-related fields to IntentRecord
- Add dispute constants: DISPUTE_WINDOW (1 hour), ARBITER_WINDOW (24 hours), DISPUTE_BOND (1 USDC)
- Implement begin_fill to escrow tokens and start dispute window
- Implement open_dispute for user bond posting
- Implement resolve_dispute for arbiter decision with bond handling
- Implement release_fill for permissionless escrow release after window closes
- Add error codes for dispute scenarios (33-37)

closes stellar-vortex-protocol#236
closes stellar-vortex-protocol#233
closes stellar-vortex-protocol#234
closes stellar-vortex-protocol#235
@drips-wave

drips-wave Bot commented Aug 29, 2026

Copy link
Copy Markdown

@Darkdante9 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant