LSDFi Reimagined: Peeling back the curtain on zkOracles! [2.5/3]

Unstable Team
Unstable Protocol
Published in
4 min readNov 12, 2023

In the previous article, we talked about zkOracles, a class of decentralized, trustless fair price oracles enabled by zk-SNARK proofs of validator balances and L1 state. Today, we’re excited to peel back the curtain and show an actual working example of this oracle.

Before we dive into things: a brief background of what are zk-SNARKs?

“Don’t trust, verify”

-Satoshi, probably

Vitalik offers a great primer here: https://vitalik.ca/general/2021/01/26/snarks.html.

“Perhaps the most powerful cryptographic technology to come out of the last decade is general-purpose succinct zero knowledge proofs, usually called zk-SNARKs (“zero knowledge succinct arguments of knowledge”). A zk-SNARK allows you to generate a proof that some computation has some particular output, in such a way that the proof can be verified extremely quickly even if the underlying computation takes a very long time to run.”

“But zk-SNARKs are quite complex; indeed, as recently as in 2014–17 they were still frequently called “moon math.””

Why “moon math”? Well, basically computing zk-SNARKs was so difficult that even cryptography experts regarded it as incomprehensibly complex as astrophysics. Thankfully, technology has improved materially since then, such that today we’re able to generate and verify proofs in a way that’s never been simpler or cheaper.

How does this apply to LSDfi?

Succinct Labs’ Telepathy client introduces a zkSNARK circuit that enables Ethereum validator signatures to be verified on-chain, effectively enabling an Ethereum light client to run as a smart contract on L1 and L2s, with the same security guarantees as Ethereum’s light client protocol.

What does this mean? Well, this means we can trustlessly query and represent the state of Ethereum L1 and the beacon chain!

Why is this so important? Well, today there’s no real way to query the state of the Beacon Chain from Ethereum L1. For example, the only real way to query the balances of the validators backing a LSD is to rely on the LSD protocol reporting the balance. This is obviously centralized and vulnerable to manipulation. By leveraging Telepathy, we’re able to query the validator balances backing a LSD in a trustless manner and represent that state on-chain. We call this primitive zkTVL.

Telepathy can also be used to trustlessly bridge the read-only state of any chain onto any other chain without ever having to spend gas on Ethereum L1. For example, let’s say you wanted to know the circulating supply of a LSD on Arbitrum. Today, you’d either need to do this with off-chain automation like Gelato (which is obviously centralized), or with a messaging solution like LayerZero (which is expensive as you need to do transactions on Ethereum L1 to create the message). Now, we’re able to trustlessly query the state of any read-only function on Layer 1, and write that state on any Layer 2. We call this primtive zkState.

Building zkOracles with zkTVL and zkState:

By combining the zkTVL, which gets the validator balances on the Beacon Chain, with the zkState, which can query the circulating supply on Ethereum L1, we can calculate the price of a LSD in a completely trustless, decentralized manner. We can also do this from any Layer 2!

In the last blog post, we wrote: “A working proof-of-concept for the zkOracle has been achieved internally.” — A subtle nod at Sam Altman’s recent post on Reddit, which he later edited to clarify that he was memeing.

But unlike Sam Altman — we’re not memeing. We’re proud to announce and release a working proof of concept of our zkOracle today, demonstrating the full workflow for trustlessly computing and verifying LSD fair values.

Over the coming days, we’ll be adding more examples; demoing a live front-end, and demonstrating integrations that are possible with this technology. zkOracles for LSDs is the most obvious use case, allowing Unstable to integrate as collateral practically any LSD. “But what about LRTs?” you might ask. We are already working to extend this to value the collateral backing Eigenlayer restaked assets (which we believe will be the next biggest growth driver in the liquid staking space); this will enable Unstable to be a pioneer in pricing LRTs and supporting them as collateral.

Unstable is looking for zkTalent!

We’re not looking for “researchers” — we’re looking for someone who’s ready to build and ship. If you are interested in building cutting-edge, production ready systems in DeFi, want to grow your expertise in the coolest nascent technology (zk-SNARKs), or are just a Solidity whiz; we want to talk to you! Reach out to careers@unstable.money.

--

--