Architecture

Twilight is built on 4 key constructions:

  • Forkscanner: An independent rust implementation to monitor bitcoin forks, which is further connected to multiple bitcoin full nodes.

  • Validity Gadget: An on-chain gadget to detect forks in the bitcoin network and achieve fast deposit/withdrawal time.

  • Boomerang: A fragmented bitcoin liquidity reserve, where only 1% of the liquidity gets unlocked at a time.

  • ZkOS: A stack based stateless VM that supports parallelizable execution by default.

Safety and Liveness

One of the biggest challenges with using lightning is there is no way to know if the watchtower has received your transaction. Twilight builds on top of a BFT consensus to ensure each node has the transaction data, aka safety. This leaves the guesswork/trust out of the system design.

The side effect of using a BFT style consensus is you end up with a Proof of Stake system, where you need to ensure slashable security for liveness of the protocol.

BTC and ZkOS Oracle

The bitcoin signing logic and proof verificaiton of ZkOS has been kept as an external oracle to the validator of twilight. This is mapped to the validator's address at the bootstrapping of the protocol.

Last updated