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

# Onchain Settlement: Spot, Deferred, and Permissionless

Settlement in Canopy requires no broker, no clearing house, and no administrator. The smart contract enforces every transfer deterministically — when conditions are met, funds move; when they are not, transactions revert. This is a structural property of the protocol, not a policy choice that could be reversed. Whether you are settling a spot trade in the same block it was filled or redeeming a forward months after it was originated, the mechanics are identical: the contract evaluates onchain state and executes atomically.

## Spot Settlement

Spot offers settle at the moment of fill. When a buyer submits a fill transaction, the protocol performs an atomic swap: the buyer's quote tokens flow directly to the seller (plus fee to the fee recipient), and the seller's escrowed asset tokens flow directly to the buyer. Both legs of the transfer happen in a single transaction — either both succeed or neither does. There is no pending state, no waiting period, and no possibility of one leg completing without the other.

<CardGroup cols={3}>
  <Card title="Atomic Execution" icon="bolt">
    Both legs of the swap execute in a single transaction. No partial settlement is possible.
  </Card>

  <Card title="No Intermediary" icon="circle-xmark">
    Quote tokens move directly from buyer to seller. The venue never holds quote balances.
  </Card>

  <Card title="Instant Finality" icon="check-double">
    Once the fill transaction confirms, settlement is complete and irreversible.
  </Card>
</CardGroup>

<Note>
  Quote tokens are never custodied by the venue. At fill time, they flow directly from buyer to seller (and fee recipient) in the same transaction that releases the escrowed asset. The venue's custody surface is limited to the asset being sold.
</Note>

## Deferred Settlement

For forward offers, the underlying assets remain in escrow from offer creation through the series' unlock time. During this window, claim tokens circulate freely as ERC-20 tokens and the collateral backing them is fully secured. When the unlock timestamp passes, the claims become immediately redeemable — no off-chain oracle, no admin action, and no separate on-chain trigger is required.

<CardGroup cols={2}>
  <Card title="Collateral Secured Until Unlock" icon="vault">
    Escrowed assets cannot be withdrawn, moved, or reallocated while outstanding claims exist. The backing is immovable until redemption.
  </Card>

  <Card title="Immediate Eligibility at Unlock" icon="timer">
    The contract evaluates the current block timestamp at redemption time. The instant the timestamp is reached, redemptions are valid — no waiting for a separate trigger.
  </Card>
</CardGroup>

## Redemption Process

Any address that holds claim tokens for an unlocked series can redeem at any time after the unlock timestamp. The process is fully self-service:

<Steps>
  <Step title="Holder Calls Redeem">
    The claim token holder submits a redemption transaction to the venue, specifying the series ID and the quantity of claim tokens to burn. The caller must hold at least this many tokens in their wallet.
  </Step>

  <Step title="Claim Tokens Are Burned">
    The protocol immediately burns the submitted claim tokens from the caller's balance, reducing the total outstanding supply for the series. This is the first on-chain state change — irreversible once the transaction executes.
  </Step>

  <Step title="Escrowed Assets Released">
    The protocol releases exactly `amount` units of the underlying asset from escrow to the caller's wallet in the same transaction. The series' `backing` counter is decremented by the same amount. This is a strict 1:1 exchange — one claim token always redeems for one unit of the underlying asset.
  </Step>
</Steps>

## Permissionless by Design

No party — not the offer seller, not the protocol team, and not any administrator — can block or delay redemption once the unlock time passes. The contract's redemption logic has no access controls gating the caller, no pause mechanism on the redemption path, and no whitelist requirement. If you hold claim tokens and the unlock time has passed, you can redeem.

<CardGroup cols={2}>
  <Card title="No Admin Approval" icon="user-slash">
    Redemption does not require any signature, approval, or action from the seller or protocol team.
  </Card>

  <Card title="No Whitelist" icon="list-check">
    Any address holding claim tokens can call redeem, regardless of how they acquired the tokens.
  </Card>

  <Card title="No Off-Chain Trigger" icon="wifi-slash">
    The unlock time is evaluated entirely from the block timestamp. No oracle, API, or keeper bot is required.
  </Card>

  <Card title="No Pause on Redemption" icon="play">
    The redemption path is not affected by the entry pause. Once the unlock time is reached, redemption is unconditionally available.
  </Card>
</CardGroup>

<Warning>
  The protocol cannot prevent redemption after the unlock time. This is a deliberate design guarantee — claim holders can always recover their underlying collateral once the unlock timestamp passes, regardless of any external circumstances.
</Warning>

## Settlement Comparison

<AccordionGroup>
  <Accordion title="Spot vs. Deferred Settlement" icon="scale-balanced">
    | Property                  | Spot                                    | Deferred (Forward)                      |
    | ------------------------- | --------------------------------------- | --------------------------------------- |
    | When assets transfer      | At fill time                            | At redemption (post-unlock)             |
    | Quote token flow          | Buyer → Seller + Fee Recipient, at fill | Buyer → Seller + Fee Recipient, at fill |
    | Asset token flow          | Escrow → Buyer, at fill                 | Escrow → Redeemer, at redemption        |
    | Claim tokens issued       | No                                      | Yes                                     |
    | Unlock time required      | No                                      | Yes                                     |
    | Permissionless settlement | Yes (instant at fill)                   | Yes (anytime post-unlock)               |
  </Accordion>

  <Accordion title="What if I miss the unlock date?" icon="calendar-clock">
    There is no expiry on redemption rights. Claims remain redeemable indefinitely after the unlock time — the protocol does not confiscate unclaimed collateral. You can redeem a week, a month, or a year after unlock and your collateral will still be waiting in escrow.
  </Accordion>

  <Accordion title="Can multiple holders redeem from the same series?" icon="users">
    Yes. Each redemption reduces the outstanding claim supply and the series' `backing` counter by the exact amount redeemed. Multiple holders can each redeem independently; the 1:1 backing ratio ensures every holder receives their full entitlement.
  </Accordion>
</AccordionGroup>
