Offers | Chialisp

submited by
Style Pass
2022-01-13 12:30:10

Offers enable peer-to-peer asset exchange in Chia's ecosystem. In other words, you can swap tokens that run on Chia's blockchain without needing to go through an exchange. Only two parties are required -- the Maker, who creates the offer, and the Taker, who accepts it.

A clique of classical jazz enthusiasts creates a new token in Chia's ecosystem called "CAT King Cole" (CKC). Alice has 1 XCH in her wallet, and she wants to join the CKC club. The current exchange rate is 251 CKC per XCH.

Alice likes those numbers, so she uses her Chia wallet to generate an offer file with the following conditions, to be enacted upon the offer's acceptance:

So far, this is not a valid transaction. She hasn't actually spent her XCH, and she can't create CKC out of thin air -- this isn't a jazz improv show. She needs someone to take the other side of this offer.

Alice scours the internet and finds a message board where fans of CKC like to share their latest riffs. She posts her offer file and waits, not knowing who will agree to face the music. However, she does know that potential Takers cannot modify the offer -- they must take it or leave it. Additionally, acceptance of the offer is on a first come, first served basis. They better act quickly!

Leave a Comment