Create a Chia Offer File and Execute an Atomic Swap: Complete Tutorial

14 min read

A digital illustration showing two miners shaking hands across a glowing blockchain network, with floating file icons and cryptocurrency symbols (XCH, CAT tokens) exchanging between them.

Key Takeaways

  • Chia offer files enable secure peer-to-peer trading of XCH, CATs, and NFTs without centralized exchanges or middlemen
  • Atomic swaps guarantee complete trades – either both sides execute fully or nothing happens, eliminating counterparty risk
  • Two creation methods available: simple GUI wallet approach for beginners and powerful CLI for advanced users
  • Offer files are self-contained and safe – they contain no private keys and can be shared freely via email, Discord, or marketplaces
  • You control your funds completely until the moment a trade confirms on the blockchain, with instant cancellation available anytime

Chia offer files let you trade cryptocurrency assets directly with other people anywhere in the world without trusting a third party. These special files create atomic swaps that either complete fully or not at all, protecting both traders from scams and giving you complete control of your funds throughout the entire process.

What Is a Chia Offer File?

A Chia offer file is a partially signed transaction that proposes a trade between two parties.1 Think of it like writing half of a check – you specify what you want to give and what you want to receive, but the trade only happens when someone else signs the other half.

The file itself is just a string of text, usually saved with a .offer extension. This text contains an incomplete spend bundle that describes your side of the trade.1 The beauty of this system is that the file is completely safe to share publicly. It contains no private keys or sensitive information.

How Offer Files Keep You Safe

Offer files use a special property called atomicity. This means the trade either completes 100% as described or doesn’t happen at all.1 There’s no possibility of someone taking your assets without giving you what you requested in return.

Your funds never leave your wallet until someone accepts your offer and the transaction confirms on the blockchain.2 Even while an offer is public and waiting for someone to accept it, you maintain full control. You can cancel the offer at any time by simply spending the coins yourself.

What You Can Trade With Offer Files

Chia’s offer system supports trading any combination of assets on the Chia blockchain. The most common trades involve XCH (the native Chia cryptocurrency), CATs (Chia Asset Tokens like USDS or wUSDC), and NFTs (non-fungible tokens).1 You can even trade multiple different assets in a single offer.

For example, you could create one offer that trades 0.5 XCH plus an NFT in exchange for 100 USDS tokens. The system handles all the complexity of making sure every piece of the trade executes together.

Comparison: GUI vs CLI Offer Creation

FeatureGUI MethodCLI Method
Best ForBeginners, visual learners, simple tradesAdvanced users, automation, complex offers
Setup TimeMinutes – just install walletRequires terminal access and commands
Ease of UsePoint and click interfaceText commands, need to know wallet IDs
FlexibilityBasic options, limited customizationFull control over all parameters
Batch CreationOne at a time onlyCan script multiple offers
Asset SupportXCH, CATs, NFTs all supportedAll assets plus advanced features

Method 1: Creating an Offer File Using the Chia Wallet GUI

The graphical user interface method is the easiest way to create your first Chia offer file.3 Most crypto miners and traders will find this approach perfect for their needs without getting into complex commands.

Step 1: Open Your Chia Wallet and Navigate to Offers

Launch your Chia reference wallet application. You’ll find the Offers tab in the left sidebar navigation.3 Click on it to access the offers interface. The wallet must be synced to the network before you can create offers – look for the green sync indicator in the top right corner.

Step 2: Click Create an Offer

Inside the Offers screen, you’ll see a button labeled “Create an Offer” near the top. Click this button to start building your offer. A new window will appear asking you to specify what you want to offer and what you want to receive in return.

Step 3: Select Assets and Enter Amounts

The offer creation screen has two sections. On the left side, you select the assets you’re willing to give away. On the right side, you specify what you want to receive.3 Use the dropdown menus to choose asset types – XCH, specific CAT tokens, or NFTs from your wallet. Then enter the amounts you want to trade.

For example, if you want to trade 0.1 XCH for 10 USDS tokens, you would select XCH on the left and enter 0.1, then select USDS on the right and enter 10.

Step 4: Set Expiration Time

By default, offers expire after seven days.1 This prevents someone from accepting your offer months later when prices have changed dramatically. You can adjust this timeframe using the expiration dropdown. Setting a shorter expiration like a few hours works well for active trading, while longer periods suit more patient sellers.

Step 5: Add Optional Transaction Fee

You can include a blockchain fee with your offer.1 This fee only gets charged when someone accepts the offer, not when you create it. Adding a small fee helps your transaction process faster during busy network periods. The fee amount depends on current network conditions – anywhere from 0.00001 to 0.0001 XCH typically works well.

Step 6: Review and Create Offer

Before finalizing, carefully review all the details. Make sure the amounts are correct and you selected the right assets. Once you click “Create Offer,” the wallet will generate your offer file and show you a summary. The assets you offered will appear as “locked” in your wallet balance, but you still control them completely.

Step 7: Save and Share Your Offer File

The wallet will prompt you to save the .offer file to your computer. Choose a memorable location and filename. You can now share this file however you want – upload it to marketplaces like Dexie, email it to a specific buyer, share it on Discord, or even convert it to a QR code.

Method 2: Creating an Offer File Using the Command Line

For advanced users and crypto miners who prefer working in the terminal, the command line interface provides more power and flexibility.4 This method lets you script offer creation and access advanced features not available in the GUI.

Understanding Wallet IDs

Before creating a CLI offer, you need to identify your wallet IDs. Your standard XCH wallet is usually ID 1.4 Each CAT token you add creates a new wallet with its own ID number. To see all your wallets and their IDs, run this command.

chia wallet show

The output displays all your wallets with their IDs, types, and balances. Take note of the wallet IDs for the assets you want to trade. For example, you might see that Wallet ID 1 is your XCH wallet and Wallet ID 2 is your USDS CAT wallet.

Basic Offer Creation Syntax

The basic command structure for creating an offer looks like this.4 The -o flag specifies what you offer, -r specifies what you request, and -p sets the file path where your offer will be saved.

chia wallet make_offer -o <wallet_id>:<amount> -r <wallet_id>:<amount> -p <filepath>

Example: Trading XCH for USDS Tokens

Let’s create an offer to trade 0.1 XCH for 10 USDS tokens. Assuming XCH is wallet 1 and USDS is wallet 2, the command would be this.4

chia wallet make_offer -o 1:0.1 -r 2:10 -p ~/offers/0.1xch_for_10usds.offer

The wallet will show you a summary of what you’re offering and requesting. Confirm the details look correct, and the offer file will be created at the path you specified.

Adding Fees and Expiration

You can add optional parameters to your CLI offers.4 The -m flag adds a transaction fee. The --expires-at flag sets a specific expiration timestamp. Here’s an example with both.

chia wallet make_offer -o 1:0.1 -r 2:10 -p ~/offers/trade.offer -m 0.00001 --expires-at 1704070800

The expiration timestamp uses Unix time format. You can find Unix timestamp converters online to set your desired expiration date and time.

Creating Multi-Asset Offers

The CLI allows complex offers involving multiple different assets.4 You can specify multiple -o and -r flags in a single command. For example, offering both XCH and a CAT token for an NFT.

chia wallet make_offer -o 1:0.5 -o 2:100 -r 3:1 -p ~/offers/multi_asset.offer

This creates an offer giving 0.5 XCH plus 100 units of the CAT in wallet 2, requesting 1 unit from wallet 3 (which could be an NFT wallet).

How to Share and Distribute Your Offer File

Once you’ve created your offer file, you need to get it to potential buyers. Chia’s decentralized approach gives you complete freedom in how you share offers.2 Unlike centralized exchanges where you must use their platform, you can distribute offer files through any communication method.

Upload to Decentralized Exchanges

Marketplaces like Dexie provide the easiest way to reach many potential buyers. Visit the Dexie website and look for the option to post an offer. Upload your .offer file, and it becomes visible to everyone browsing that marketplace. Dexie aggregates offers from many users, creating order books similar to traditional exchanges but without centralized control.

Gene Hoffman, COO of Chia Network, explained the vision behind this system in a blog post, stating that offers enable “one market everywhere the internet touches, and it trades 24/7” with liquidity available for any asset on the Chia blockchain.5

Direct Sharing Methods

For private trades with specific people, you can send offer files directly. Email works perfectly – just attach the .offer file to your message. Discord and Telegram users often share offers in trading channels by uploading the file or pasting the encoded text string.

QR codes provide another creative option.2 You can encode your offer file as a QR code and display it anywhere. Someone can scan it with their phone, copy the offer string, and accept it in their wallet. This works great for in-person trades or posting offers in online communities.

Using the Splash Network

Splash is a peer-to-peer gossip network designed specifically for broadcasting Chia offers.5 When you submit an offer to Splash, it gets distributed across the network to maximize visibility. This decentralized approach ensures offers reach interested buyers quickly without relying on any single platform.

How Someone Accepts Your Offer

When a potential buyer finds your offer, they go through a simple acceptance process.3 Understanding this helps you create better offers that people will want to accept.

The Taker’s View

The person accepting your offer (called the “taker”) opens the offer file in their Chia wallet. Their wallet automatically reads the file and displays exactly what they’ll give and what they’ll receive.3 The wallet validates that the offer is still valid and hasn’t been canceled or already taken.

If they have the required assets and agree to the terms, they click to accept. Their wallet then creates the other half of the transaction, signing it with their private key. The complete transaction gets broadcast to the Chia blockchain.

GUI Acceptance Process

In the Chia wallet GUI, takers click the “View an Offer” button and either select the .offer file from their computer or paste the offer string.3 The wallet shows a clear summary of the trade. After reviewing and confirming, the taker clicks “Accept Offer” and the transaction submits to the network.

CLI Acceptance Command

Command line users can accept offers with a simple command.4 The wallet validates the offer and prompts for confirmation before submitting.

chia wallet take_offer /path/to/offer_file.offer

Blockchain Confirmation

After acceptance, the transaction enters the mempool and waits for confirmation. Chia blocks occur approximately every 18-20 seconds, so most trades confirm within 1-3 minutes. Both parties can watch their wallets update in real-time as the transaction confirms. Once confirmed, the trade is final and irreversible.

Chia Offer Files vs Traditional Exchanges

FeatureChia Offer FilesCentralized Exchanges
CustodyYou keep your assets until trade confirmsMust deposit to exchange-controlled wallet
Counterparty RiskZero – atomic execution guaranteedExchange could be hacked or freeze funds
Trading Hours24/7/365 – always availableUsually 24/7 but subject to maintenance
KYC RequirementsNone – completely permissionlessRequired for most exchanges
Trading FeesOptional blockchain fee only (0.0001-0.001 XCH typical)Exchange fees typically 0.1-0.5% per trade
Speed1-3 minutes for blockchain confirmationInstant on exchange, hours for withdrawal
PrivacyPseudonymous blockchain addressesExchange knows your identity
Asset SupportAny asset on Chia blockchainOnly assets exchange chooses to list

Canceling and Managing Your Offers

One of the biggest advantages of Chia offer files is that you maintain complete control even after creating an offer.1 You’re never locked into a trade that hasn’t executed yet.

Two Ways to Cancel Offers

You can cancel an offer in two different ways. The simple method just deletes the offer from your local wallet. This works fine if the offer file never left your computer. However, if you shared the offer publicly, someone might still have a copy and try to accept it.

The secure cancellation method involves broadcasting a cancellation transaction to the blockchain.1 This spends the coins that were reserved for your offer, making the offer file permanently invalid. Anyone who tries to accept the offer after this will get an error saying it’s no longer valid.

GUI Cancellation

In the wallet interface, go to your Offers section and find the offer you want to cancel.3 Click on it and you’ll see a cancel button. The wallet will ask if you want to cancel on-chain or just locally. For offers you’ve shared publicly, always choose the on-chain option labeled “Cancel on blockchain.”

CLI Cancellation

Command line users can cancel offers with the cancel_offer command.4 Include the --secure flag to broadcast the cancellation to the blockchain.

chia wallet cancel_offer --id <offer_id> --secure true

Automatic Cancellation Through Coin Spending

An interesting feature of Chia offers is that they automatically become invalid if you spend the coins they reference.2 For example, if you create an offer to sell 1 XCH, but then send that 1 XCH to another wallet, your offer becomes invalid immediately. This provides a quick cancellation method without needing to explicitly cancel the offer.

Real World Case Study: Carbon Credits Trading

In August 2024, Chia Network partnered with EcoRegistry to launch the first publicly accessible global carbon credit market using offer files.6 High-quality tokenized carbon offsets became available for purchase by anyone through Dexie marketplace.

David Juan Duran Hernandez, CEO of EcoRegistry, stated they’re “driving an important climate change mitigation effort through broader access to high-quality carbon credits using tokenization.”7 The partnership with Chia enables 24/7 trading of verified carbon offsets that previously required intermediaries and private market access.

Each carbon credit is tokenized as a CAT on the Chia blockchain and tracked through the World Bank’s Climate Action Data Trust.6 Market makers create offer files selling these credits for stablecoins like wUSDC.b. Buyers anywhere in the world can accept these offers and immediately retire the credits to offset their carbon footprint.

This demonstrates offer files working at enterprise scale. The same technology crypto miners use to trade XCH and CATs now powers a global environmental commodity market.8 Offers provide the perfect solution because buyers and sellers never need to trust each other or a central marketplace.

Advanced Offer File Features for Crypto Miners

Setting Expiration Timestamps

Smart traders use expiring offers to protect against price changes.5 If you’re market making or trying to capture arbitrage opportunities, set short expiration times of 5-15 minutes. This prevents someone from accepting your offer hours later when market conditions have shifted dramatically against you.

Mining operations that want to sell XCH for stablecoins regularly can create expiring offers and rebroadcast updated ones every few minutes as prices change. Automated scripts can handle this process, maintaining constant liquidity for your mining rewards.

Creating Multiple Paired Offers

You can create multiple offers for the same coin simultaneously.5 For example, if you’re selling an NFT, create separate offers requesting different payment tokens – one for XCH, one for USDS, one for wUSDC. When someone accepts one offer, all the others automatically become invalid because they reference the same coin.

This maximizes your chances of finding a buyer without any additional risk. The buyer gets to choose their preferred payment method, and you receive automatic cancellation of the unused offers.

Combining Offers for Larger Trades

Platforms like Dexie allow combining multiple offers into a single transaction. If you see several small offers that together meet your needs, you can batch them and execute all at once. This saves on blockchain fees and simplifies larger trades.

For miners converting significant amounts of XCH to stablecoins, combining offers often provides better overall rates than taking a single large offer. You can mix and match the best available prices across multiple sellers.

Embedding Fees Strategically

When you embed a fee in your offer, the taker doesn’t pay additional fees.1 This makes your offer more attractive compared to similar offers that require the taker to add their own fee. During busy network periods, including a generous fee ensures your trade processes quickly.

However, remember that you only pay the fee if someone accepts your offer. If the offer expires or you cancel it, you don’t lose the fee. This makes it low-risk to include higher fees to make your offers more competitive.

Common Security Considerations

Verifying Unknown CAT Tokens

When accepting an offer that includes a CAT token you don’t recognize, be extremely careful.4 Scammers can create CATs with names similar to legitimate tokens. Always check the Asset ID (also called TAIL or launcher ID) against official sources before accepting.

Major CAT tokens maintain public lists of their official Asset IDs. Cross-reference any unknown token against blockchain explorers like Spacescan to see if it matches the legitimate token. Never assume a token is real just because the name looks right.

Checking Offer Validity

Before accepting any offer, your wallet automatically checks that it’s still valid.4 An offer becomes invalid if the maker has canceled it on-chain, if it has already been accepted by someone else, or if the maker has spent the offered coins. Your wallet will warn you if you try to accept an invalid offer.

Understanding Locked Balances

When you create an offer, the wallet shows those coins as “locked” or “pending.”1 This doesn’t mean you’ve lost control – it’s just a visual reminder that those specific coins are reserved for an offer. You can still spend them anytime, which will automatically cancel the offer.

Some users worry when they see locked balances, but there’s no cause for concern. Your coins remain in your wallet under your control. The lock is simply preventing you from accidentally creating conflicting transactions that would invalidate your offer.

Troubleshooting Common Issues

Offer Immediately Shows as Canceled

If you upload an offer to Dexie or another marketplace and it immediately appears as canceled, you likely created it with coins that have already been spent or are being used in another offer. Check your wallet to ensure you have available (unlocked) balance of the asset you’re trying to offer.

The solution is to combine your coins first using the wallet’s coin management features, or create a new offer using different coins.

Can’t Find Wallet ID for Command Line

If you’re trying to create a CLI offer but don’t know your wallet IDs, run chia wallet show to list all wallets.4 Look for the Type field to identify which wallet holds which asset. Standard XCH wallets show type STANDARD_WALLET, CAT wallets show type CAT, and NFT wallets show type NFT.

Offer Takes Long Time to Confirm

Occasionally offers take longer than usual to confirm on the blockchain. This typically happens during periods of high network activity. If your offer has been pending for more than 10 minutes, check that you included an adequate fee. Offers with no fee or very small fees may wait in the mempool behind other transactions.

You can always create a new offer with a higher fee and cancel the slow one if needed.

Wallet Not Recognizing CAT in Offer

To accept an offer containing a CAT you don’t have in your wallet, you must first add that CAT to your wallet.3 In the GUI, go to “Manage Token List” and search for the token by name or add it using its Asset ID. Once added, the wallet will recognize it in offers.

Future Developments and Use Cases

Chia offer files continue evolving with new capabilities. Recent developments include integration with the Data Layer for atomic database swaps,2 enabling entirely new use cases beyond simple asset trading.

Organizations are exploring offer files for supply chain tracking, where physical goods transfer requires simultaneous database updates. Governments are testing offers for international carbon credit trading between national registries. The Chia ecosystem is building options contracts and lending markets entirely on offer files.

For crypto miners, these developments mean increasing liquidity and more sophisticated trading opportunities. As offer file infrastructure matures, expect to see advanced order types, better price discovery, and integration with traditional financial systems.

Conclusion

Creating and executing Chia offer files puts you in complete control of your trades while eliminating the risks of centralized exchanges. Whether you choose the simple GUI approach or the powerful command line method, you now have the knowledge to safely trade XCH, CATs, and NFTs peer-to-peer.

The atomic swap guarantee means you never have to worry about getting scammed or losing funds to exchange hacks. Your assets stay in your wallet until the exact moment a trade completes on the blockchain. Start with small test trades to build confidence, then scale up as you get comfortable with the process.

Take action today by creating your first offer file and experiencing the freedom of truly decentralized trading. The Chia offer system represents the future of cryptocurrency exchanges – secure, transparent, and completely under your control.

Chia Offer File Tutorial FAQs

Can I create a Chia offer file without a full node running?

Yes, you can create a Chia offer file using the light wallet mode without running a full node. The light wallet connects to remote full nodes to sync your wallet and broadcast offers. Creating and sharing offer files works identically in light wallet mode, though accepting offers may take slightly longer to validate since your wallet must query remote nodes for blockchain data.

What happens if someone accepts my Chia offer file after I’ve deleted it?

If you only deleted the offer file locally without canceling on the blockchain, someone can still accept it if they have a copy. The offer remains valid until you either cancel it by broadcasting a cancellation transaction or spend the coins referenced in the offer. Always use the “cancel on blockchain” option for offers you’ve shared publicly to ensure they become truly invalid.

How do I find the wallet ID for a specific CAT when creating a Chia offer file?

Run the command chia wallet show in your terminal to display all your wallets with their IDs, types, and balances. Look for the CAT name or Asset ID you want to trade – the wallet ID appears on the left side of each entry. Your standard XCH wallet is typically ID 1, while CAT wallets have higher numbers assigned in the order you added them.

Can I create a Chia offer file that trades multiple different assets at once?

Yes, Chia offer files support multi-asset trades in both directions. You can offer any combination of XCH, multiple CAT tokens, and NFTs, requesting any combination of assets in return. Simply specify multiple wallet IDs when creating the offer. The entire trade executes atomically – either all assets exchange simultaneously or the offer fails without any partial execution.

Why does my Chia offer file show as canceled immediately after uploading to Dexie?

An offer shows canceled immediately if the coins it references have already been spent or are reserved for another offer. This happens when you create multiple offers using the same coins, or if you’ve sent those coins elsewhere since creating the offer. Check your wallet balance and ensure you have available unlocked coins for the amounts you’re trying to offer, then create a fresh offer file with valid coins.

Chia Offer File Tutorial Citations

  1. Chia Documentation. (2025). “Offers | Chia Documentation.” https://docs.chia.net/academy-offers/
  2. Chialisp.com. (2025). “Offers | Chialisp.” https://chialisp.com/offers/
  3. Chia Documentation. (2025). “Wallet Guide | Chia Documentation.” https://docs.chia.net/reference-client/getting-started/wallet-guide/
  4. Chia Documentation. (2025). “Offers – CLI | Chia Documentation.” https://docs.chia.net/guides/offers-cli-tutorial/
  5. Chia Network. (2024). “Chia Offers: Unlocking Global Peer-to-Peer Markets.” https://www.chia.net/2024/02/16/chia-offers-unlocking-global-peer-to-peer-markets/
  6. Chia Network. (2024). “Carbon Credits are Now Available for Purchase with Offers.” https://www.chia.net/2024/08/28/carbon-credits-are-now-available-for-purchase-with-offers/
  7. Chia Network. (2024). “From Carbon Market to One Market.” https://www.chia.net/2024/08/28/from-carbon-market-to-one-market/
  8. XCH.today. (2024). “The First Global and Publicly Accessible Carbon Market.” https://xch.today/2024/09/15/the-first-global-and-publicly-accessible-carbon-market/