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

# How it works

> A walkthrough of the three stages every Base ledger payment passes through.

The lifecycle of a payment is the same on every Base ledger: funds enter through the Portal contract,
move privately within the ledger, and exit back to Base. The operator runs the services that process
each step and decides how to authorize withdrawals.

## The lifecycle

<Frame>
  <img src="https://mintcdn.com/base-a060aa97/zNLot9X12YrmeXqY/images/ledger/base-ledgers-diagram.png?fit=max&auto=format&n=zNLot9X12YrmeXqY&q=85&s=890f74acaf70622277538a88339b14dc" alt="Transaction lifecycle swimlane: deposit, hold and transact in private, then withdraw, across User / SDK, Ledger, and the Portal contract on Base." width="1786" height="660" data-path="images/ledger/base-ledgers-diagram.png" />
</Frame>

A payment moves through three stages:

1. **Deposit.** A user moves funds from Base into the ledger through the Portal contract. The recipient
   remains encrypted, so deposits to one user remain unlinked. See [Deposit flow](/ledgers/deposit-flow).
2. **Hold and transact in private.** Inside the ledger, users can transfer, swap, and earn yield while balances and activity remain private.
3. **Withdraw.** A user moves funds back to Base through the operator. Onchain, a withdrawal reveals
   the asset and amount but not the account behind it, so deposits and withdrawals stay unlinkable.
   See [Withdraw flow](/ledgers/withdraw-flow).
