> ## Documentation Index
> Fetch the complete documentation index at: https://docs.debridge.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Execution Model

> How deBridge executes cross-chain trades

Understanding how deBridge executes trades helps you build reliable integrations and debug issues when they arise.

## DLN Order Execution

The deBridge Liquidity Network uses a transaction-based model where users create orders by submitting transactions on the source
chain.

### Creating an Order

1. **Create Transaction**: API returns expected output, fees, and rates, along with transaction data ready to be signed
2. **Submit**: User signs and submits on source chain
3. **Order Created**: Smart contract emits event with order details

### Order Fulfillment

Once an order is created:

1. **Detection**: Solvers detect the new order
2. **Evaluation**: Solvers assess profitability
3. **Fulfillment**: Winning solver sends tokens to recipient on destination
4. **Unlock**: Solver claims locked tokens on source chain

```mermaid theme={null}
sequenceDiagram
    participant User
    participant Source Chain
    participant Solver
    participant Destination Chain

    User->>Source Chain: Create order (lock tokens)
    Source Chain-->>Solver: Order detected
    Solver->>Destination Chain: Fulfill (send tokens to user)
    Solver->>Source Chain: Claim unlock
    Source Chain-->>Solver: Tokens released
```

### Time to Settlement

* **Order creation**: 1 block confirmation (\~12-15s on Ethereum)
* **Fulfillment**: Typically 10-60 seconds after creation
* **Total**: Usually under 2 minutes end-to-end

## Gas Payment

### DLN

* **User pays**: Gas on source chain for order creation
* **Solver pays**: Gas on destination chain for fulfillment
* **Included in rate**: Destination gas cost factored into quoted rate

## Error Handling

### DLN Order Failures

deBridge is completely decentralized and has no mechanism to hold deposited funds. **Users can always cancel their orders before
they're fulfilled**.

| Scenario              | Outcome                                                                                                              |
| --------------------- | -------------------------------------------------------------------------------------------------------------------- |
| Order creation fails  | User retains tokens, no order created                                                                                |
| No solver fills order | User can cancel via smart contract call on the destination chain, or automatically via auto-cancellations if enabled |

## Tracking Execution

### DLN

Track order status via API polling. See
[Order Tracking](/dln-details/integration-guidelines/order-creation/order-tracking-api/tracking-orders).

## Cancellation

### DLN Orders

* **Before fulfillment**: User can cancel via smart contract call on the destination chain, or via auto-cancellations (if enabled
  for the integration) where deBridge subsidizes the gas fees after a timeout

## Next Steps

* [Fees and Pricing](/home/architecture/fees-overview)
