So, first I want to preface this by saying my experience with DeFi in general is pretty limited. I haven’t used any of the major platforms like Uniswap or Sushiswap or any of these liquidity pool / token etc systems. And I don’t really have any desire to, mostly out of a lack of trust. Without the ability to thoroughly audit these platforms it is impossible to know whether they are properly hardened to avoid getting completely hosed. And that’s because they aren’t really decentralized, they are simply distributed. Each swap provider is its own central point of failure. That brings me to DeFi on Chia.
Chia Network is taking a bit of a different approach to enabling a DeFi ecosystem. Instead of requiring institutions to hold liquidity to enable swaps, Chia has written a smart contract platform called Offers which enables true peer to peer asset exchanges between asset types. For example, on the Ethereum blockchain if you wanted to exchange your Ether for USDT you would need to use a professional fee-based service that holds both and and sells one for the other. This service can be a smart contract instead of a web service, which is I think why they call it DeFI, but its still a centralized mechanism of exchange, architecturally speaking. Offers allows any two users on the Chia blockchain to directly exchange one asset type for another without sending funds to a centralized service or smart contract.
This doesn’t prevent centralized services from leveraging this technology stack to do business, but it does mean that Chia blockchain users can sidestep them entirely. In fact, I think for most of the trading that is traditionally done on DeFi, trading one volatile asset for another, a centralized service keeping track of spot pricing and protecting its users from massive price swings will probably be worth a small fee.
Offer files
An offer file is the output of creating a partial filled transaction using the Chia blockchain. Creating an offer does not actually transact on the blockchain itself, but basically uses the wallet keys to sign a commitment to fulfill a transaction. Because this doesn’t exist directly on the blockchain it does not take a transaction fee to create. It also cannot be filled by someone just watching the blockchain, so you can use them for private transactions without exposure to someone you hadn’t planned on filling the order before your intended recipient. As long as you are careful with the offer itself.
Inside the offer is just a string of text starting with “offer1” and a couple kilobytes of encrypted text. It looks a little bit like a traditional certificate file, because it kind of is, or is at least similar. It describes the offer, and is encrypted with the keys from the wallet creating the offer. When you create one, it locks up the coins used to generate that offer, but this is a client side restriction done to make your life easier and not a hard requirement. An offer can be created and a spend forced against the same coins using 3rd party software, or a wallet that doesn’t see the offer creation. This will just create a situation where the offer file fails when the other party tries to complete it, even if you still have enough balance in your wallet. An offer is not generated against a wallet but against a specific coin in that wallet, so be aware. This also means that you can lock up significantly more than you intend. The code block below is an example of a real offer file.
offer1qqp83w76wzru6cmqvpsxygqqwc7hynr6hum6e0mnf72sn7uvvkpt68eyumkhelprk0adeg42nlelk2mpafrgx923m0l475zenawhrdfdvrh7fq5q7t7mxnkv9wvff0ln2hs7n98rtxn6fyc4mvnqr92ytnnprul3nnkjekwzkw6kxju0jdx7a8n76wer2wudpanw487u6mjll0urx8vm2g4kpvvtggyt4cy2fv5g8mdu5kk3l3j7ns4ftla07ej00hllme9dtlejum0d9jumz4pc6mlsg4lcs7dv3wmm4f8m9thzme6tlwl0wd3g0sh0ad4pxxu7tfh80qxyzteskkpu3kmyw5qnc958ke9585ed58sedk8uqj6zh2650sx9m6p2y7c8jtd8mtjut66k855zp9536z7h894rxukw6qfel04svrkcmm3mw7sv5hjakd9tpc3dhfeltc073knleta5le3m8tv0unljc847698747avnttaqss5hxgplnhad2cvzxakynl8egrxvj7gnatf396ufn0elvn6jf9xzlemw9rdwau9q9h40w8valmmjljxx0m8tm8ukwrnewxl8lt3dr5szd45q8fr47dlspgy8emlzwc0yf9vp3j2dl0lqhm4uhntawv69fsc7dmelu9tzhauhzjjc08yuw98lea3knmt32pyhtphynxl6haqux756mlpc5l2mundrv864xlw7ff0mtuulztumwl35l5lyv7lx4m4a79lszyltu0f987pxwa6mfw9k0kunm370c4haz6hvnlahm0jnxldtawl80stwftu8lc92cmm70xdltnxlmed7n3m48mgd886486pd695gntxxxcx57pk6kclupw6gk5qnutlqxs5vpxy9e3ye2hctafflxasmjkudhrfs95m0ktt47uhkm4kk4wlyk434nn7h3862clgsjdqgzvfcktg4g0m60a2gls0a0lrzxfteye6js0yavmgnnsweah5e64rtelvh9t7mw5khwfx63jl6vl6t72lpalx8w03t0y8l4muqxgeqa7nh0tnwhpuz2kmasalwe34rjw08md4clm8nc2ax8jchal4t0nx6kpfxm7lkf977qcqs3l985g0vw3kr
That offer, loaded into a light wallet, will enable someone to spend 100 000 XCH and buy The Chia Plot Master token. This is an example of a straightforward transaction of 1 CAT for a set amount of XCH, but you can create them as complex as you would like with a large set of CATs and XCH for another set of CATs and/or XCH. Sky is the limit from what I can tell (although there are also probably some limits).
Decentralized Exchanges
Right now the decentralized exchanges that launched with Chia have done so as simple marketplaces for offer files. You can add offers to OfferBin and Hashgreen directly from the Chia light wallet client and the experience is pretty good. Anyone can browse those marketplaces, download an offer file and complete the transaction without communication with the original offer creator.
In a sense, this isn’t really decentralized because it involves websites that are central points to aggregate offers. But the underlying technology does not require this, and there are a nearly infinite number of platforms or mechanisms two people can use to complete an offer. I can open one up on my computer, phone someone, read them the very long string of text while they type that into a text file on their end and then complete the transaction without a file passing between us. You can post them to a discord channel, or a keybase channel – which Chia has created, and is also seeing a lot of use. You can post your offer on twitter and have people grab them and complete them.
Conclusion
As this is my first real experience delving into DeFi I am not sure what I expected. I see a ton of potential here for using offer files as payment options for assets that are represented by a CAT on the Chia blockchain. It is very easy and cheap to mint a set of tokens, and once you have a token it is very easy to sell that token using offer files. What is difficult is dealing with rapidly changing pricing, that is going to require centralized services to act as counterparties to trades so that offers do not sit so outside market rates that they don’t get filled constantly. Right now to create an offer for coins with volatile pricing, like SpaceBucks, you have really pay attention to the market and basically guess at what price to set your offer at and hope it gets picked up right away. Services are certain to spring up around this problem, but likely at the cost of decentralization and the peer to peer experience.
These are early days for DeFi on Chia. It is unlikely that what we are looking at now will be the state of the art for long. Based on the rapid development on all the marketplaces I have looked at (Offerbin, Hashgreen, and Tsunami) I think that in a month or two a lot of the rough edges will have been sanded down and the experience will be a lot more polished. If you want to see a really cool social experiment with Chia DeFi and CATs check out Freddie’s new blog 1mojo.trade. It is a fascinating journey and is likely to be cutting edge on Chia DeFi as long as it is going on.
If I understand your article. You have made an offer posted in the article to sell thechiaplot for 100000 xch? Or at least the cat for the chia plot?
in dark mode the box is white on white