Execute
Manually execute an XvP settlement after approvals and any HTLC secret reveal are complete. Use this action when auto-execute is disabled and the settlement is ready to commit on-chain.
Manual execution commits a ready XvP settlement on-chain. Trigger this step when you disabled auto-execute at creation. The platform executes only after all local senders approve. External-flow HTLC settlements also require the secret to be revealed first.
Before you execute
Check these conditions before triggering execution:
- The settlement has not executed and the operator has not cancelled it.
- The settlement is before cutoff, unless a counterparty already revealed the secret for an external-flow HTLC settlement.
- Every required local sender has approved and locked assets.
- For external-flow HTLC settlements, the counterparty has revealed the hashlock secret.
- You can access the settlement and complete wallet verification.
Execute from the settlement page
Open the ready settlement
Go to Settlements and open the settlement you want to execute. Confirm that the detail page shows approvals are complete and the Execute button is visible.
For an HTLC settlement, also confirm that the secret has already been revealed. If the secret is still missing, use the reveal-secret flow first. A revealed HTLC settlement can still show Execute after cutoff; execution remains the settlement path because the external leg is already committed.
Review the flows
Review the local asset movements in the execute dialog. Treat this as the final operational check before the settlement contract calculates net positions.
Confirm with wallet verification
Click Execute, confirm the dialog, and complete wallet verification. DALP queues an execute() transaction against the settlement contract and returns a transaction hash once the call is submitted.
Verify completion
After the transaction confirms, check that the settlement shows as executed and that the asset movements appear in the settlement history. The execution event records the address that submitted the call.
Who can execute
Through the Platform API or Console, triggering manual execution requires an authenticated user, wallet verification, and tenant-scoped access to the settlement.
At the settlement-contract level, execute() is not limited to the original senders or recipients. Any caller can submit the call while the settlement accepts it, or after cutoff when an HTLC settlement has already revealed its secret. The contract only completes the commit when every precondition is met.
What DALP and the contract do
| Stage | Behaviour |
|---|---|
| Access check | DALP first checks that the requested settlement is readable in the current tenant context. |
| Wallet verification | The API route requires wallet verification before DALP queues the transaction. |
| Transaction queue | DALP encodes execute() with no function arguments and queues the call for the selected wallet. |
| Contract checks | The settlement must carry full approval and satisfy the hashlock condition. For HTLC settlements, hashlock-satisfied means the counterparty revealed the secret. Cutoff only blocks execution prior to the secret reveal. |
| Net settlement | The contract calculates each local participant's net position per local asset, debits locked balances, transfers ERC20 assets to recipients, and enforces a zero net-balance invariant. |
| On-chain record | The contract marks the settlement as executed and emits the execution event with the caller address. |
API shape
The execute input identifies the settlement address. The contract call itself has no additional arguments.
{
"settlementAddress": "0x8a4f0f2f3c9e7b7a7b2a1c7c1d5e3f4a5b6c7d8e",
"walletVerification": {
"secretVerificationCode": "123456",
"verificationType": "PINCODE"
}
}The platform returns the transaction hash for the queued on-chain call.
{
"transactionHash": "0x..."
}Troubleshooting
| Issue | What to check |
|---|---|
| Execute button is not visible | Confirm that auto-execute did not already commit the settlement and that the settlement is ready. For HTLC settlements after cutoff, verify that the counterparty revealed the secret. |
| Execute button is disabled | Confirm that every required approval is complete and, for HTLC settlements, that the counterparty revealed the secret. |
| Transaction fails: not fully approved | One or more required local senders still need to approve and lock assets. |
| Transaction fails: secret not revealed | The settlement has an external HTLC flow and the counterparty must reveal the secret before execution. |
| Transaction fails: expired, cancelled, or already executed | If the settlement expired before the HTLC secret reveal, use the relevant recovery or review flow instead of retrying execution. Cancelled or executed settlements cannot execute again. |
| Transaction fails: net-balance invariant | Stop and review the settlement flows. The contract rejected execution because the local net positions did not balance for an asset. |
Related tasks
- Approve settlement flows: approve and lock the local assets before execution.
- Reveal secret: satisfy the HTLC hashlock before executing an external-flow settlement.
- Withdraw expired: recover locked assets after a settlement passes its cutoff date without execution.
- XvP settlement overview: review the full local and HTLC settlement lifecycle.
How to reveal an HTLC settlement secret
Reveal the hashlock preimage for an external-flow HTLC settlement, queue the on-chain reveal transaction, and optionally notify counterparties by email.
Cancel
Stop an open XvP settlement and return locked assets to their original senders. Learn when the cancel endpoint cancels immediately, when it records an HTLC cancel vote, and when expired-withdrawal is the correct recovery path.