Layer Cake is a material advance in the security, speed and scalability of bridging between smart contract networks, addressing the core vulnerabilities of existing approaches and handling the risk of crossing zones of sovereignty.
It will leverage Flare’s State Connector to securely and trustlessly bridge assets between any two smart contract Layer-1s, including to and from Flare. It will also enable FAssets to flow to any other smart contract chain.
- Fast, decentralized and insured bridges for smart contract tokens.
- Zero user collateral bridging of any asset to Flare or between any set of connected smart contract networks, L1 or L2.
- Multilateral rather than bilateral bridges, which unifies liquidity.
- Decentralized & resistant to chain reorganizations.
- Useful in an environment of proliferating chains and subnets.
When Layer Cake launches, anyone who uses a Layer Cake bridge will be able to earn a share of the monthly rewards from the cross-chain incentive pool. This will apply whether value is bridged to Flare or to any other integrated chain.
Existing Bridging Technology
A cross-chain bridge is a connection which enables the transfer of assets or information between two separate blockchain ecosystems. There are two primary types of technology used within cross-chain bridges – custodial (including multi-signature schemes), and light client relays. Neither are satisfactory.
Custodial bridges:
The majority of existing bridges rely on a globally trusted set of entities to custody user funds through multi-signature wallets. If these custodians become faulty, then all funds on the bridge are at serious risk of being lost.
Light Client Relays:
A more technical but less popular approach for creating a bridge between chains involves the use of light client relays. This technology relays information from a light client, which is a highly simplified version of a blockchain node in which only the block headers are available. This technology can only operate safely if it operates slowly.
Layer Cake
Layer Cake, built by Flare Network, will be a new and better approach to bridging between any two smart contract blockchain ecosystems. It has been built from the ground up rather than being based on existing unsatisfactory technology.
- No need to compromise between speed and safety with Layer Cake’s fast, decentralized, multilateral and insured bridges.
- Resistant to chain reorganization, allowing safe operation across different zones of sovereignty.
- Scales linearly rather than quadratically, connecting all chains without fragmenting liquidity.
Speed and safety
A decentralized relay protocol powered by a light client relay can only operate safely if it is operating slowly, due to the requirement for fraud proofs, data availability sampling or challenge periods. Flare’s State Connector can safely and trustlessly acquire the state of another chain much faster than a light client relay. This lets us employ a mechanism to secure a fast moving bridge with Flare – Bandwidth Providers.
A decentralized group of Bandwidth Providers each lock an amount of Bandwidth Collateral into the Layer Cake contract on Flare. The amount of collateral held is equal to the maximum value of assets that may cross the Layer Cake bridge in a given unit of time (initially specified as 1 hour).
Users crossing a Layer Cake bridge pay a market-priced fee, similar to a gas fee, to a Bandwidth Provider to reserve bandwidth collateral. This collateral insures the asset while in transit across the bridge.
Compared to existing bridging protocols which require collateral to be held the entire time an asset is represented on the destination chain, Layer Cake only requires a temporary collateral lock-up while assets cross the bridge. This means no long-term collateral requirements.
Resistant to chain reorganization
When bridging between chains, each chain is exposed to the risk of consensus attack on the other chain, known as a reorganization attack. Although the risk is low, because the cost to perform the attack is high, the impact of such an attack is very significant and should be mitigated to support a healthy cross-chain economy.
In a reorganization attack, after a bridging transaction is complete from chain A to B, consensus on the origin chain A is attacked in order to return it to the state prior to the original deposit. If successful, the attacker would still have their original tokens and the wrapped version on destination chain B.
In Layer Cake, Bandwidth Providers provide collateral for insurance while assets transit the bridge, plus collateral to protect against chain reorganization. The risk of reorganization diminishes exponentially with each additional block, so this reorganization collateral can be released shortly after transit is complete.
High scalability
Current light client relay technology requires decentralized bridges to be bilateral. To connect all of the top 100 chains to each other in this fashion would require 4950 bilateral bridges. This is neither feasible nor advisable. With different organizations likely creating the different bridges, different and non-interchangeable tokens would be created based on the route an asset had taken – for example Cosmos-ETH vs Cosmos-Solana-ETH. This fragments liquidity.
Flare can bridge 100 chains with just 101 smart contracts, and the token issued by the contract on each chain is the same regardless of the origin chain. This unifies liquidity and is a much more user friendly design.
Conclusion
In the context of frequent bridge attacks, the blockchain ecosystem urgently needs a new, more secure cross-chain bridging approach. While bridges using light client relays are a dramatic improvement on custodial bridges using multisignature schemes, they still require a compromise between being either slow or unsafe.
Flare’s Layer Cake bridge will use the power of the State Connector to provide fast, decentralized and insured bridges between smart contract blockchains, only requiring collateral while the asset traverses the bridge. In a world of proliferating chains, parachains, subnets, sidenets and supernets, Flare can Connect Everything.
If you would like to learn more about Layer Cake, please read the Layer Cake white paper.