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

# Transaction Encoding

Kontor uses a hybrid-UTXO model, in which  assets can exist one of two states, and move fluidly between them, even within a single block.

**Attached state:** Assets are "attached" to Bitcoin UTXOs, making them tradeable using standard Bitcoin tools:

* PSBTs (Partially Signed Bitcoin Transactions)
* Bitcoin Script interactions
* Native Bitcoin wallet support
* Atomic swaps with other Bitcoin metaprotocol tokens

**Detached state:** Assets are "detached" for use in smart contracts:

* Held in contract state
* Subject to programmable logic
* Can be transferred between contracts
* Can cross-contract call with type safety

This hybrid model gives Kontor unique interoperability—assets are first-class Bitcoin citizens while also supporting rich programmable logic. Users can perform single-confirmation atomic swaps between BTC, KOR, and other Bitcoin metaprotocol assets (Ordinals, Runes, Counterparty), or chain a swap directly into a contract call within a single Bitcoin transaction.

**Example flow:**

1. User holds BTC, wants to call a Kontor contract (which requires KOR for gas)
2. User constructs a Bitcoin transaction that atomically: swaps BTC → KOR, then calls the contract with KOR
3. All happens in one transaction, one confirmation
4. No pre-funding, no separate accounts, no bridges
