[bitcoin-dev] Designing Bitcoin Smart Contracts with Sapio (available on Mainnet today)
jlrubin at mit.edu
Fri Apr 9 03:57:39 UTC 2021
I'm very excited to introduce Sapio <https://github.com/sapio-lang/sapio>
formally to you all.
Sapio empowers Bitcoin Developers to craft smart contracts in an intuitive,
safe, and composable way. Sapio challenges the notion that you can't make
complex smart contracts for Bitcoin, and opens the floodgates for a myriad
of new ideas to be defined easily. Sapio works today on mainnet without any
protocol changes (via user-configurable multisig oracles, it will work
OP_CHECKTEMPLATEVERIFY <https://utxos.org> and Taproot when they are
You can learn more about what's possible by reading *Designing Bitcoin
Smart Contracts with Sapio <https://learn.sapio-lang.org>*. My Reckless
VR Talk <https://judica.org/blog/sapio/> also does a great job of
breaking down the core programming model for Sapio contracts, although the
language has evolved substantially since I gave the talk.
As a concrete instance of Sapio working in the wild, I am currently
executing on mainnet a Congestion Control Tree
<https://utxos.org/analysis/bip_simulation/> contract with 25 recipients
(the first Sapio contract to run on mainnet ever, as far as I'm aware). You
can review the source code, arguments, compiler outputs, and transactions
To see more examples of what you can do with Sapio, the repo includes
for derivatives, vaults, coin pools, games, side chains, and more. These
aren't intended to be production grade contracts -- yet -- but are
demonstrative of what can be built and how. I'm excited to see what people
build -- please open up PRs with your ideas or any issues you encounter
trying to implement them.
You can also try out Tux <https://github.com/sapio-lang/tux>, an
experimental GUI, to inspect, simulate, and interact with smart contracts.
You can see the Congestion Control Tree mentioned earlier loaded in Tux
This is still early work-in-progress software, so tread lightly and use
regtest. Enough of the components work today that it was appropriate to
share now and invite more developers to contribute or otherwise support the
Sapio is developed free and open source for all bitcoiners by Judica.org
Thank you to all who have helped reach this milestone of the first mainnet
Sapio contract, including Ryan Grant, BitMEX, ACINQ, Delphi Digital,
Backend Capital, my github sponsors https://github.com/sponsors/jeremyrubin,
and numerous other supporters both fiscal and technical. I also want to
highlight the excellent work done on Miniscript and the rust-bitcoin
ecosystem, the foundation upon which Sapio rests.
Eager for you feedback,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the bitcoin-dev