Fantom: envisioning a zk future

Andre Cronje
3 min readNov 16, 2022

--

Intro

Yes, zk is a buzzword, just like blockchain, ICO, defi, NFT, and gamefi.

Of the 1000+ blockchains that have been launched, a handful has had real adoption.

Of the 1000+ ICO’s that have been launched, a handful have created real products.

Of the 1000+ defi protocols that have been launched, a handful has had real usage.

NFTs and gamefi aren’t there yet, but give it another 2–3 years.

Same with zk.

There are lots of variants of zk, just like there are lots of variants of blockchains, ICO’s, defi, NFT’s, and gamefi.

zk in relation to Fantom is about base layer scaling.

Background

With Fantom’s consensus lachesis, if we remove the EVM and just do direct transfers, our TPS caps out at ~28,000 (as last stress tested 12/2018, by now this limit is higher). If we enable the EVM, we cap out at ~700 TPS.

The bottleneck isn’t consensus, and even on consensus, if we switch from confirming blocks to instead confirm transactions, we can further increase that cap. You can read more about that here

The bottleneck is EVM (or rather complex storage and computation in a sequential context).

Our immediate roadmap includes significant improvements to the above, EVM 2.0 or FVM, which include super instruction sets, dynamic translation, parallel execution of transactions within the same block, flat storage, compaction, and data locality. More on these topics later, for now you can read an introduction of the reasoning here

After the above go live, our ceiling becomes closer to the consensus throughput.

Blue sky zk roadmap

Blockchain nodes do the following (highly oversimplified);

  • Receive and order events
  • Perform computation based on stored instructions trigger by events
  • Load state from storage, transform state based on above computation, store state in storage

This would mean a blockchain node would require infinite storage and infinite computation. Neither are feasible.

Infinite storage has already been achieved outside of the context of blockchains, via p2p file sharing, or the more well known torrent infrastructure.

Infinite storage in the context of blockchains is fairly simple, instead of storing the smart contract and storage data, it holds a proof or hash of the smart contract and storage data and a list of seeds where it can connect to fetch the actual data. As a dapp gains more users, more seeds become available.

Fantom already has this on our roadmap.

Infinite computation is more complex. What we need as input is the following; the original state, the proof that computation was performed (but validating the proof can’t take longer than having done the computation itself), and the output state. This is where zk comes in. Specifically localized (within the webapp / mobile app / pc or console) FVM’s.

This would look as follows;

  • Open webapp / mobile app / pc or console client (further called app)
  • The app connects to local peers to find seeds
  • The app syncs to the latest state from seeds and becomes a seed itself
  • The user performs some input
  • The original state is transformed via the in-app zk-vm, which generates the state root, the proof of correct execution, and the state output.
  • The above state transition and proofs are communicated to the peers.
  • Via lachesis (Fantom’s consensus) the peers reach consensus

The above is the true blue skies goal, no centralized nodes, no spoke model architecture, all mesh networks for a more robust, trustless, decentralized future.

--

--

Responses (5)