Thesis and Introduction
Welcome to Chainflip. This "Concepts" section will help break down in a reasonable level of detail how the Chainflip protocol works - but only conceptually! This whole site is frequently updated, including the technical documentation provided to help you set up a Validator.
For over a decade, the primary method of transferring value between blockchains has been the centralised exchange. This reality has limited composability between ecosystems and has made it difficult for specialist or alternative blockchains to be readily adopted by increasingly large Web3 userbases. Despite this, the vast majority of Web3 users rely on non-custodial wallets to perform even the simplest functions with DeFi, NFTs, DAOs, and a myriad of other applications.
Engineering a generalised solution to this problem has been under discussion as far back as 2012. A decade later, and centralised exchanges still have a firm grip on the market share, but on-chain solutions have been making significant progress.
Uniswap, a competing implementation of the core Automated Market Maker (AMM) idea first created by Bancor in 2016, revolutionised crypto-markets forever by popularising liquidity pools and on-chain trading in mid-2020. After fighting off several competing protocols, Uniswap v3 has cemented the Uniswap product as the dominant solution to swaps on Ethereum mainnet since its release in mid-2021.
Uniswap achieved this by enabling on-chain trading not just for end users, but also by allowing other products and contracts to programmatically swap tokens behind the scenes, something which had not been previously possible. This allowed for the creation of a variety of user experiences and DeFi products which have generated significant fee revenue on Ethereum since 2020. Efficient token swaps powered by Uniswap have enabled the DeFi ecosystem as a whole to rapidly evolve, and created an ecosystem of trading and finance run entirely on-chain.
With no Uniswap, there would probably be no Aave, 1inch, Curve, Yearn, or even OpenSea. On-chain trading is an immense force-multiplier and one of the most important primitives in crypto development.
Due to the protocol's success, several Uniswap-based protocols have appeared on alternative smart-contract blockchains. This has allowed for relatively easy on-chain trading in a single-chain smart contract execution environment, with much of the same positive impacts Uniswap had on Ethereum within each individual blockchain ecosystem.
However, Web3 extends far beyond a single environment. As scalability problems continue to impact the user experience of popular chains, either through high transaction fees, unreliable network performance, or additional friction in the user experience (such as that with sharding and L2s), it is clear that multiple, mutually isolated execution environments will coexist long into the future. It is also clear that application specific blockchains and whole ecosystems are still cut off from on-chain markets, and that there is no good method of programmatically trading between any of them.
Since the original Chainflip Whitepaper was published in May 2020, dozens of “cross-chain” solutions have emerged on the scene. Whilst it is clear that there is huge market demand within the sector, none have achieved widespread adoption to the extent of Uniswap, in spite of the fact that the addressable market seems much bigger than ERC-20 tokens alone. Reasons for that can be summarised by the following:
- Many products have been built that rely on creating or utilising synthetic assets which violate the sovereignty of execution environments, fragment liquidity, and ultimately degrade the user experience for everyone.
- The typical cross-chain user experience is almost universally poor and badly explained.
- Products that do offer native swapping often do so at rates which can be described as vaguely similar to the global index price at best, and often with unacceptably high slippage. Accurate and fair swap pricing should not be an afterthought.
Rather, the method for transferring value between chains would be better if:
- It is wallet and chain agnostic. That is, it supports any generic wallet that can send ordinary transactions on any type of blockchain.
- It does not require native chains to support a specific execution protocol or make changes to its underlying consensus rules or infrastructure, meaning it is generalised and not limited to the Ethereum Virtual Machine (EVM) or smart contract enabled chains.
- It executes as much computation off-chain as possible, meaning that gas usage on expensive chains is minimised and the execution environment can be customised to better suit the use case.
- It does not involve any ‘wrapped’ or synthetic assets. That is, there was simply one generic transaction submitted to conduct the swap, and users are not exposed to any risk after the swap is complete.
- Developers could easily leverage the technology to improve their own products through simple Remote Procedure Calls (RPC) calls, meaning no special wallets, Software Development kits (SDKs), or other complex frameworks would be needed to be leveraged by application developers.
Programmatic swapping is what Uniswap enables on Ethereum. Chainflip’s ultimate goal is to enable programmatic swapping for all major blockchains, unlocking new possibilities for product developers, and offering users an easy to use, reliable, secure, and permissionless method of avoiding custodial exchanges altogether.