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

# Transaction Lifecycle

> Learn the full lifecycle of a OneBalance transaction, from quote generation and signing to execution and final confirmation.

<Info>
  The numbers shown below are indicative and strongly depend on the use case conditions.

  Not sure about the term? Visit [Glossary](/resources/glossary) to see all the definitions.
</Info>

<img src="https://mintcdn.com/onebalance-d7e5d4d0/fj4XqnBdVauIrF8s/images/Screenshot2025-05-28at21.11.09.png?fit=max&auto=format&n=fj4XqnBdVauIrF8s&q=85&s=c86fdd013c76adf338f727ac9710968c" alt="Screenshot2025 05 28at21 11 09 Pn" width="1538" height="1076" data-path="images/Screenshot2025-05-28at21.11.09.png" />

## Transaction Types and Properties

<CardGroup cols={3}>
  <Card title="Swaps & Transfers" icon="arrow-right-left">
    Swap and transfer any token on any supported chain.
  </Card>

  <Card title="Contract calls" icon="code">
    Execute any smart contract calls on any chain, spending the aggregated balance while preserving `msg.sender`
  </Card>

  <Card title="Fast vs Standard Path" icon="route">
    **Fast Path** for cross-chain execution removes source chain txs latency.

    **Standard Path** is a basic sequential execution for cross-chain operations
  </Card>
</CardGroup>

Read more on Fast path and Resource locks [here](/concepts/resource-locks).

## Transaction Execution Sequence (Swap example)

```mermaid theme={null}
sequenceDiagram
    participant User
    participant OneBackend
    participant RL Service
    participant Solver
    participant SourceChain
    participant TargetChain

    User->>OneBackend: Submit request
    OneBackend->>Solver: Request quote
    Solver-->>OneBackend: Return quote
    OneBackend->>User: Return quote

    User->>User: Sign source chain operation
    User->>OneBackend: Submit signed operation

    OneBackend->>RL Service: Forward signed operation
    RL Service->>RL Service: Verify & cosign operation
    RL Service->>OneBackend: Return operation & guarantees
    OneBackend->>Solver: Submit operation & guarantees
    
    Note over User,TargetChain: Fast Path via same chain
    Solver->>TargetChain: Execute target chain operation
    OneBackend->>TargetChain: Query execution result

    OneBackend->>User: Confirm success
    
    Note over User,TargetChain: Fast Path via cross-chain

    Solver->>TargetChain: Execute target chain operation
    OneBackend->>TargetChain: Query execution result

    OneBackend->>User: Confirm success
    OneBackend->>SourceChain: Execute source chain operation
    
    Note over User,TargetChain: Standard Path

    OneBackend->>SourceChain: Execute source chain operation
    Solver->>SourceChain: Query execution result
    Solver->>TargetChain: Execute target chain operation
    OneBackend->>TargetChain: Query execution result

    OneBackend->>User: Confirm success
```

## Execution Flow Walkthrough

### 1. Initial Request Phase

* User submits an intent (e.g., swap ETH aggregated across chains for SOL on Solana)
* OneBackend handles the request, performing routing and other optimizations
* Note that spending can happen from multiple chains within the same intent without affecting the flow. Our service determines how many funds are available on each chain and whether they are eligible for Fast or Standard Path execution.

### 2. Providing the Quote

* The solver system provides a quote that specifies pricing, including gas and swap fees
* The user receives the quote and decides whether to proceed
* The user signs the operation with their session key and sends it back to OneBackend

### 3. Validation and Security Phase

* OneBackend forwards the signed operation to our RL Service
* The RL Service verifies the user's request and provides security attestation
* Based on security status, the transaction follows one of these paths:
  * Fast Path via same-chain execution
  * Fast Path via cross-chain execution (immediate execution with security guarantees)
  * Standard Path (execution after the escrow transaction is confirmed)

### 4. Execution Phase

OneBackend submits operations and security guarantees to the solver. The execution then follows one of three paths:

<Tabs>
  <Tab title="Fast Path (Same Chain)">
    <Tip>
      Same-chain Fast Path is the quickest execution method, completing in seconds.
    </Tip>

    1. Solver executes the operation on the target chain
    2. OneBackend verifies execution and confirms success to the user
    3. OneBackend executes the operation on the source chain
  </Tab>

  <Tab title="Fast Path (Cross-Chain)">
    <Tip>
      Cross-chain Fast Path provides immediate execution with security guarantees, bypassing source chain finality wait times.
    </Tip>

    1. Solver executes the operation on the target chain
    2. OneBackend verifies execution and confirms success to the user
    3. OneBackend executes the operation on the source chain
  </Tab>

  <Tab title="Standard Path">
    <Note>
      Standard Path follows traditional sequential execution and is used when Fast Path conditions are not met. This path is usually at least 2x slower than the Fast Path due to waiting for source chain finality.
    </Note>

    1. OneBackend executes the operation on the source chain
    2. Solver verifies execution on the source chain
    3. Solver executes the operation on the target chain
    4. OneBackend verifies execution and confirms success to the user
  </Tab>
</Tabs>

## Fast Path Execution Criteria

A multichain intent leverages the Fast Path if it's routed on the same chain **OR** if all of the following conditions are met:

1. User has enough finalized, non-pre-approved on-chain balance (aggregated across chains) that is not yet locked (spent but not yet settled)
2. There is no source-chain swap in the execution flow
3. RL Service does not exceed the total open (not yet settled) position according to the risk policy
