# XvP execution models

Source: https://docs.settlemint.com/docs/operators/system-addons/xvp-settlement/execution-boundaries
Clarify what DALP executes for local XvP settlement, what it records for external-flow settlement, and which off-chain checks remain outside the settlement contract.




XvP settlement executes DALP-compatible local flows and records the data needed to coordinate an external flow. The platform does not price the exchange, charge fees, prove that an external rail settled, or turn an off-chain leg into DALP-controlled execution.

Use this page to decide which checks belong in DALP and which belong in your external settlement process before you create a settlement.

## Execution summary [#execution-summary]

| Question                                                       | DALP-owned behavior                                                                                                                                    | Operator-owned behavior                                                                                             |
| -------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------- |
| Does DALP execute every transfer?                              | Yes, when every flow is `type: "local"` and uses DALP-compatible token contracts on the same chain.                                                    | Confirm each local sender, token, balance, approval, and cutoff date before execution.                              |
| Does DALP execute an external flow?                            | No. DALP stores an external-flow reference and uses a hashlock or secret to coordinate the local leg.                                                  | Run the external rail, chain, custodian, ledger, or counterparty process that honours the same hashlock and timing. |
| Does DALP calculate the commercial price or quote?             | No. The create schema accepts flow amounts. It does not calculate an off-chain quote.                                                                  | Calculate, approve, and evidence the commercial terms before creating the settlement.                               |
| Does DALP apply settlement fees inside the XvP create request? | No fee field exists in the XvP create request.                                                                                                         | Model fees as separate asset, ledger, or commercial controls when the settlement design requires them.              |
| Does DALP prove the external leg completed?                    | No. The local settlement can reveal or use the secret path, but external completion evidence stays outside DALP unless another integration records it. | Keep external settlement evidence, confirmations, and reconciliation records with the external process.             |

## Local settlement model [#local-settlement-model]

A local settlement is the narrowest model. The create request contains only local flows, so DALP encodes them into the settlement factory call. Each flow specifies the asset, sender, recipient, and transfer amount. When the settlement executes, the flows complete together or the transaction reverts. The platform never leaves a partial exchange.

Use local settlement when the exchange can be represented entirely by DALP-compatible token transfers on one chain. Same-chain delivery-versus-payment and payment-versus-payment flows fit this model when both legs use supported token contracts and the required senders can approve their own flows.

Local settlement depends on operator checks before the platform runs. DALP enforces the configured transfer instructions. It cannot make a sender solvent, grant missing permissions, or evaluate whether the economic terms are fair.

## External-flow model [#external-flow-model]

An external-flow settlement has at least one local flow and at least one `type: "external"` flow. DALP requires either a raw secret or a 32-byte hashlock for that mixed-flow design. The external flow records the referenced asset address, sender, recipient, amount, external chain ID, and external asset decimals. That record is coordination data, not an external-chain transfer: DALP locks and executes the local leg via the hashlock path, but the external rail runs its own locking and release process and DALP has no control over that leg.

Treat the external flow as a pointer to an obligation outside the local settlement contract. The platform can help both sides coordinate around the same hashlock and cutoff window, but external confirmations, custody records, and counterparty procedures remain your responsibility.

## Quote, fee, and ledger controls [#quote-fee-and-ledger-controls]

XvP settlement starts from explicit flow amounts. The create request carries no quote engine, spread calculation, fee schedule, or accounting ledger posting.

Before you create a settlement, keep these decisions outside the XvP primitive:

* Quote source: who calculated the exchange rate, price, or notional amount.
* Fee handling: whether fees are separate transfers, off-chain charges, or accounting entries.
* Ledger booking: which system records the commercial obligation and where fees and settlement outcomes land.
* Reconciliation: which system compares DALP local results with the external leg and commercial ledger.

If those controls are required for the operating model, build them as surrounding processes or integrations. Do not rely on the XvP settlement record alone as the full accounting record for an external exchange.

## What to verify before creating a settlement [#what-to-verify-before-creating-a-settlement]

| Check                    | Local settlement                                | External-flow settlement                                                            |
| ------------------------ | ----------------------------------------------- | ----------------------------------------------------------------------------------- |
| Flow composition         | Every flow is local.                            | At least one flow is local and at least one flow is external.                       |
| Hashlock input           | Not required.                                   | Required through either `secret` or `hashlock`.                                     |
| Amount source            | Confirm each flow amount before creation.       | Confirm local amounts and external amounts before creation.                         |
| External-chain fields    | Not used for local flows.                       | Set `externalChainId` and `externalAssetDecimals` for each external flow.           |
| Evidence after execution | Use the local transaction and settlement state. | Combine DALP local evidence with external confirmation and reconciliation evidence. |

## Next steps [#next-steps]

<Cards>
  <Card title="Choose a settlement type" href="/docs/operators/system-addons/xvp-settlement/choose-settlement-type">
    Pick local settlement or HTLC settlement before you configure the flows. The mode determines which coordination steps and recovery paths apply.
  </Card>

  <Card title="Local settlements" href="/docs/operators/system-addons/xvp-settlement/local/overview">
    Use the same-chain settlement path when DALP can execute every flow.
  </Card>

  <Card title="HTLC settlements" href="/docs/operators/system-addons/xvp-settlement/htlc/overview">
    Coordinate a DALP local leg with an external-flow reference through hashlock and secret reveal.
  </Card>
</Cards>
