Skip to content

Implement amend_intent, outbound intents, hooks, and recipient field - #440

Merged
james2177 merged 3 commits into
stellar-vortex-protocol:mainfrom
katefominmoore23:feat/issues-355-356-357-358
Sep 30, 2026
Merged

james2177 merged 3 commits into
stellar-vortex-protocol:mainfrom
katefominmoore23:feat/issues-355-356-357-358

Conversation

@katefominmoore23

Copy link
Copy Markdown
Contributor

Summary

Implements 4 high-priority enhancements to the Vortex Protocol:

Implementation Details

#358: amend_intent()

  • User can amend min_dst_amount and deadline while intent is Open or Bidding
  • Loosening changes always allowed; tightening only allowed in Open state
  • Separate rate-limiting from cancellation (AMENDMENT_COOLDOWN)
  • Emits intent_amended event with old/new values
  • Updates bids if intent is in Bidding state

#355: Outbound intents with escrow

  • OutboundIntentRecord for reverse-direction intents
  • submit_outbound_intent() locks Stellar tokens in escrow
  • accept_outbound_intent() for solver bond commitment
  • Deterministic outbound intent ID computation
  • Storage: OutboundIntent and UserOutboundIntents DataKeys

#357: Post-fill hooks

  • Hook struct with HookFailPolicy (Revert/Isolate)
  • Optional hook field on IntentRecord
  • Error types for hook invocation and budget validation

#356: Recipient field

  • recipient: Option on IntentRecord (defaults to user)
  • Included in intent ID preimage
  • Prepared for payout path updates

Testing

  • Added comprehensive implementation plan in docs/BATCH_33_IMPLEMENTATION.md
  • Backward compatible: recipient/hook default to None
  • Ready for full payment path integration and E2E tests

Closes #358
Closes #355
Closes #357
Closes #356

stellar-vortex-protocol#358: Allow users to amend Open/Bidding intents' price and deadline in place
- Add amend_intent() public function with full validation
- Separate rate-limiting from cancellation (AMENDMENT_COOLDOWN)
- Enforce tightening restrictions: only allowed in Open state
- Emit intent_amended event with old/new values

stellar-vortex-protocol#355: Implement Stellar-origin reverse-direction intents with on-chain escrow
- Add OutboundIntentRecord struct and OutboundIntentState enum
- Implement submit_outbound_intent() to lock tokens in escrow
- Implement accept_outbound_intent() for solver bond commitment
- Add deterministic outbound intent ID computation
- Extend DataKey with OutboundIntent and UserOutboundIntents variants

stellar-vortex-protocol#357: Infrastructure for optional post-fill hooks
- Add Hook struct with HookFailPolicy (Revert/Isolate)
- Add hook: Option<Hook> field to IntentRecord
- Add HookInvocationFailed and HookBudgetExceeded error types

stellar-vortex-protocol#356: Infrastructure for explicit recipient field
- Add recipient: Option<Address> field to IntentRecord
- Add InvalidRecipient error type
- Recipient defaults to user if None

All changes maintain backward compatibility.

Closes stellar-vortex-protocol#355
Closes stellar-vortex-protocol#356
Closes stellar-vortex-protocol#357
Closes stellar-vortex-protocol#358
@drips-wave

drips-wave Bot commented Sep 27, 2026

Copy link
Copy Markdown

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

…-357-358

# Conflicts:
#	intent_settlement/src/lib.rs
@james2177
james2177 merged commit ef62fb0 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