The Tech Under the Hood
Last updated
Last updated
Zest Protocol runs on smart contracts that are secured by the Bitcoin blockchain. These are Clarity smart contracts on Stacks, a Bitcoin L2.
Clarity smart contracts on Stacks can interact with Bitcoin by reading Bitcoin-state directly from the Bitcoin blockchain without requiring an intermediary. Stacks is our secret sauce.
To hold BTC in escrow in Zest Protocol, we leverage the Stacks L2s unique architecture that enables non-custodial movement of BTC from Bitcoin L1 to the Stacks L2 as sBTC. All while Zest Protocol users only interact with native BTC on Bitcoin L1.
Deposit: When a user sends BTC to Zest Protocol through the Zest Protocol UI, the BTC gets wrapped to a tokenised version of BTC on the Stacks layer (sBTC). Subsequently, the sBTC programmatically ends up in the Zest pool contracts.
Withdraw: When a user withdraws BTC from Zest Protocol, Zest Protocol facilitates a programmatic unwrapping from sBTC to BTC. The withdrawing user receives native BTC directly into their Bitcoin wallet.
While sBTC sits in a Zest pool, the equivalent amount of BTC is held in a threshold-signature script on the Bitcoin blockchain controlled by Stacks consensus.