The technology under the hood

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.

Zest Protocol’s technical design FAQ

How does Zest Protocol’s design differ from protocols leveraging wrapped BTC on other chains?

Wrapped BTC yield products require the user to wrap BTC before participating in on-chain activity.

These wrapped BTC products charge basis point fees for (un)wrapping BTC. Wrapping BTC into wBTC or tBTC costs ~15bps (0.15%). A lending protocol operating with wrapped BTC thus requires users to pay (un)wrapping fees before/after interacting with the protocol. In many cases, this can make interactions with lending protocols uneconomical.

For example, if I want to lend out my idle BTC for 2 months at 5% APR I'm set to earn 0.83% over these two months. If I also have to wrap BTC before interacting with the protocol and unwrap it afterwards, I'm set to earn just ~0.5% (2x 0.15% (un)wrapping fee). That in combination with the fact that wrapped Bitcoin products can be volatile and sometimes de-peg would unlikely make this yield bearing activity worth it for me as a user.

Because Zest Protocol uses Stacks under the hood, the protocol doesn't incur wrapping fees for moving BTC on and off the Stacks layer.

Last updated