Escrow Operations

Create, finish, or cancel escrows for XRP, IOU tokens, and MPTs.

XRP Escrow Demo

XRP Escrow: Create a simple escrow with XRP that can be finished or cancelled after specified times.
Please connect a wallet to create XRP escrows
1 XRP = 1,000,000 drops
Current Ripple time: Loading...

Transaction Preview

{
  "TransactionType": "EscrowCreate",
  "Account": "[CONNECT_WALLET]",
  "Destination": "[DESTINATION]",
  "Amount": "[AMOUNT_IN_DROPS]"
}

Test Scenarios

XLS-85d comprehensive testing scenarios and validation matrix.

End-to-End Testing Workflow

1

Create Token & Setup

Create MPToken with tfMPTCanEscrow and tfMPTCanTransfer flags

2

Create Escrow

Test EscrowCreate with proper CancelAfter time

3

Test Finish or Cancel

Verify timing constraints and authorization requirements

Success Scenarios

  • XRP escrow with timing conditions
  • IOU escrow with proper trust lines
  • MPT escrow with required flags
  • Escrow finish after FinishAfter time
  • Escrow cancel after CancelAfter time
  • Conditional escrow with fulfillment

Expected Failure Scenarios

  • tecNO_PERMISSION: Issuer is source account
  • tecNO_PERMISSION: IOU missing lsfAllowTrustLineLocking
  • tecNO_PERMISSION: MPT missing tfMPTCanEscrow flag
  • tecNO_PERMISSION: MPT missing tfMPTCanTransfer flag
  • tecNO_AUTH: Source not authorized by issuer
  • tecUNFUNDED: Insufficient token balance
  • tecOBJECT_NOT_FOUND: Source doesn't hold MPT
  • tecFROZEN: Tokens frozen/locked for source

Edge Cases to Test

  • Escrow with zero CancelAfter (should fail for IOU/MPT)
  • Finish escrow before FinishAfter time
  • Cancel escrow before CancelAfter time
  • Destination without required authorization
  • Transfer rate changes after escrow creation
  • Account deletion with active escrows

Key Validations

  • CancelAfter mandatory for IOU/MPT escrows
  • TransferRate/Fee locked at creation time
  • EscrowAmount tracking in MPT objects
  • Auto-creation of trust lines/MPT holdings
  • Outstanding balance unchanged during escrow
  • IssuerNode reference handling

Complete Test Matrix

Token TypeRequired FlagsCancelAfterAuthorizationFreeze Behavior
XRPNoneOptionalN/AN/A
IOUlsfAllowTrustLineLockingRequiredlsfRequireAuthDeep freeze blocks finish
MPT tfMPTCanEscrow + tfMPTCanTransfer RequiredtfMPTRequireAuthLock blocks finish

EscrowCreate Amendment 1.2.1 Features

XRP Escrow

Traditional XRP escrow with optional time-based and conditional locks.

  • Amount in drops
  • Optional CancelAfter/FinishAfter
  • Optional cryptographic conditions
  • Backward compatible

IOU Token Escrow

NEW: Escrow for issued currencies with enhanced requirements.

  • Requires lsfAllowTrustLineLocking flag on issuer
  • CancelAfter is mandatory
  • TransferRate locked at creation time
  • IssuerNode reference if applicable
  • Source must be authorized by issuer (if required)
  • Issuer cannot be the source of escrow

MPT Escrow

NEW: Multi-Purpose Token escrow with token-specific flags.

  • Requires tfMPTCanEscrow flag on token
  • Requires tfMPTCanTransfer flag on token
  • CancelAfter is mandatory
  • TransferFee locked at creation time
  • Source must hold the MPT
  • Issuer cannot be the source of escrow
  • EscrowAmount tracked on MPT objects