Skip to content

Break Taxonomy & Classification ​

When expected settlement terms conflict with observed Stellar transactions, the matcher engine deterministically classifies the discrepancy into one of 9 standardized break codes.

Complete Break Taxonomy Table ​

Break CodeDiscriminant TagExact Trigger ConditionResolution Action
AMOUNT_MISMATCHAmountMismatchobserved.amount !== expected.amountCounterparty submits top-up transfer or agrees to revised amount via dispute resolution.
ASSET_MISMATCHAssetMismatchobserved.asset !== expected.assetCorrect asset transfer required; incorrect transfer returned off-chain.
DESTINATION_MISMATCHDestinationMismatchobserved.destination !== expected.expectedDestinationVerify destination account routing; resubmit to agreed address.
REFERENCE_MISMATCHReferenceMismatchobserved.reference !== expected.referenceConfirm invoice / payment memo tag mapping.
MISSING_SETTLEMENTMissingSettlementNo transaction observed before expected.deadline sequenceExecute missing transfer or cancel expired trade agreement.
DUPLICATE_SETTLEMENTDuplicateSettlementMultiple conflicting payment transfers observed for a single case IDIdentify duplicate payment and refund redundant transaction.
LATE_SETTLEMENTLateSettlementobserved.ledger > expected.deadlineCounterparties open dispute to accept late payment or agree penalty terms.
FAILED_TRANSACTIONFailedTransactionObserved Stellar transaction completed with failed execution status (op_failed, tx_bad_auth, etc.)Retry transaction submission on Stellar network with valid signatures/balance.
UNEXPECTED_TRANSACTIONUnexpectedTransactionObserved transaction contains malformed or unregistered trade metadataValidate trade reference and schema compliance.

Matcher Precedence Logic ​

The matcher evaluates settlement conditions in deterministic precedence order:

  1. Transaction Existence Check: If no transaction exists and current ledger sequence exceeds deadline $\rightarrow$ MISSING_SETTLEMENT.
  2. Execution Status Check: If transaction is marked failed $\rightarrow$ FAILED_TRANSACTION.
  3. Asset & Destination Check: Validates asset code/issuer and recipient account $\rightarrow$ ASSET_MISMATCH or DESTINATION_MISMATCH.
  4. Amount Verification: Performs exact 7-decimal string arithmetic $\rightarrow$ AMOUNT_MISMATCH.
  5. Timeline Verification: Verifies observed ledger sequence against deadline $\rightarrow$ LATE_SETTLEMENT.
  6. Reference Verification: Validates trade reference and memo $\rightarrow$ REFERENCE_MISMATCH.
  7. Clean Match: If all checks pass $\rightarrow$ MATCHED.

Released under the Apache-2.0 License.