feat: add partial fill support for src_amount - #155
Merged
james2177 merged 2 commits intoJul 28, 2026
Merged
Conversation
Closes stellar-vortex-protocol#50 - Add PartiallyFilled state to IntentState - Add total_filled field to IntentRecord to track cumulative fills - fill_intent now accepts any positive amount; intent transitions to PartiallyFilled when total_filled < min_dst_amount, re-opening it so another solver can claim and deliver the remainder - Intent transitions to Filled once total_filled >= min_dst_amount - Protocol fee applied per individual fill for consistent accounting - slash_solver preserves PartiallyFilled state when re-opening an intent that already has partial progress - expire_intent and cancel_intent now also apply to PartiallyFilled intents - Replace fill_below_minimum_fails test (no longer valid) with fill_zero_amount_fails; add three partial-fill lifecycle tests
|
@favvy994 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! 🚀 |
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
Allows solvers to partially fill an intent's
src_amountrather than requiring an all-or-nothing fill. Large intents in thin liquidity conditions can now be completed incrementally by one or more solvers.Changes
PartiallyFilledvariant toIntentStatetotal_filled: i128field toIntentRecordto track cumulative fillsfill_intentaccepts any positivefill_amount; transitions toPartiallyFilledwhentotal_filled < min_dst_amount, re-opening the intent for the next solverFilledoncetotal_filled >= min_dst_amountslash_solverpreservesPartiallyFilledstate on re-open when partial progress existsexpire_intentandcancel_intentextended to handlePartiallyFilledintentsValidation
cargo test)cargo fmtandcargo clippy -- -D warningscleanCloses #50