Cross-Chain composability is the key to unlocking Blockchain Interoperability.
Let’s see how Chainflip is making that a reality:
1/56
Recently, Circle integrated CCIP (Cross-Chain Interoperability protocol) to allow USDC to be minted natively on different chains instead of bridging.
To bring mass adoption to DeFI, Liquidity has to be unified and not fragmented.
2/56
Bridges facilitate liquidity fragmentation, while Cross-Chain composability will facilitate liquidity unification.
Bridges facilitate liquidity fragmentation based on their design model.
3/56
• Lock and Mint
Lock asset on the source chain and mint asset on the destination chain, which introduces its wrapped version on the destination chain while still holding the asset on the source chain.
4/56
This introduces a massive barrier towards liquidity fragmentation and makes bridges a honey pot for hacks
Up till date, Over $2.5B has been hacked from Bridges
5/56
Cross-Chain brings a solution to that based on their design model.
• Mint and Burn
Mint assets on the destination chain and burn assets on the source chain; this removes the asset on the source chain and becomes permanent on the destination chain.
6/56
Cross-chain composability still being the solution is limited as using atomic swap for cross-chain transactions still has its flaws.
8/56
I found Chainflip and explored their approach to solving these issues, focusing more on these obstacles:
• Limited functionality
• Limited liquidity
9/56
Let’s see how Chainflip is bringing a solution to the above
Chainflip aims to maximize cross-chain composability by optimizing all the current cross-chain solutions.
10/56
It simply aims to be the ultimate infrastructure for transferring assets permissionlessly among different chains and networks, both EVM and non-EVM, Bitcoin, Cosmos SDK, Substrate e.t.c
11/56
Looking at the current state of cross-chain for atomic swaps, In the recent Ignas research, He asked a Thorswap team member about atomic swap feasibility, and they still hinted at the liquidity issues.
13/56
Chainflip, with its design, is solving these issues as they allow swaps natively with extremely low slippage using a more efficient liquidity management system
“Chainflip JIT AMM”
14/56
WTF is that?
Just in Time Automated Marker Maker, just like how we know AMM works, that’s the same case for Chainflip JIT AMM.
15/56
This is based on Uniswap v3 AMM design. Still, like how funds are held in a smart contract’s AMM Pool, JIT AMM is virtual, which simply means funds are not held directly in an on-chain pool using wrapped assets
16/56
but instead traded virtually on Chainflip coordinated blockchain “State chain” as account balances and settled using the existing assets natively in the vaults pool.
17/56
This seems imaginary or not so direct, right?
Throwing so more lights…steady lads
So, how do you think we’ve been moving assets from one chain to another before the birth of cross-chains?
“CEXes were the solution”
18/56
Even up till now, some users move assets from one blockchain to another through CEXes by depositing the asset and withdrawing to the preferred blockchain
This isn’t supposed to be so if we want DeFI to gain mass adoption and not to always rely on CEXes.
19/56
Cross-chain solutions came to design with different models down to atomic swaps, but there were still some barriers due to slippage and liquidity for large transfers.
CEXes still beat those cross-chain solutions regarding lesser slippage and deeper liquidity.
20/56
The only one that came close was Thorchain, but there were still some trade-offs which is still the higher slippage and liquidity
@DefiIgnas , my dear friend, performed an experiment and arrived at this again
21/56
You see the cost and time it took, right??
But what if I told you CEXes are still cheaper?
Now, Chainflip studied the approach of how this works on CEXes and implemented it in DeFI
22/56
How does it work on CEXes?
They are simply described as just servers on wallets, so when users send assets to the CEXes (server), the server now registers that balance to their account
23/56
and users can now place the trade on the server when they want to withdraw their assets, the server will send funds from the wallet it has.
This is just a simple transfer model
Easy…right?
24/56
That’s just it, and fees are way cheaper because the trading is done off-chain, not on-chain.
Remembers why ZKs have cheaper fees because the computation is done off-chain.
25/56
So back to where we were, Now explaining in detail how Chainflip JIT AMM works and why the JIT means Just in Time
26/56
Let’s say Bob wants to swap 10 $ETH for native $BTC; Bob will have to open a deposit channel in the network with his destination address connected in which he simply deposits his 10 $ETH.
27/56
The swap will automatically be routed to two pools (ETH-USDC) and (USDC-BTC) which is simple
“Swap Bob’s $ETH to $USDC in the (ETH/USDC) pool and the $USDC to (USDC/BTC) pool”
28/56
The Ethereum blockchain includes the txn in the next block which is monitored by the market makers and waits for the txn to be witnessed and executed on 8 Chainflip State Chain which also requires 4 Ethereum blocks to reach finality.
29/56
This just happens in 48s, you see the magic now??
The market makers picks up the trade and execute the swap when the swap deposit reaches the witness threshold, then the Chainflip validator now send the swapped $BTC to the user destination address
30/56
It’s also keen to know that Chainflip JIT AMM does all these while maintaining these:
A little secret you should tell only your friends.
It is simple, They put us all market maker mfers in a competition to execute your trades.
32/56
That’s not all, Chainflip also has this mechanism to mitigate MEV bots from front-running you users, They now incentivize LPs to front run each other so you users can benefit.
End of the little revelation.
33/56
But wait, there’s a catch here you might have overlooked earlier
CEXes' private keys are single-handedly controlled by one entity for signing, but when looking at the design of cross-chain in DeFI, it needs to be eliminated to enhance security.
34/56
Chainflip is more than secured
How?
Chainflip uses TSS (Threshold Signature Scheme) of about 150 permissionless validators on the network to process trades.
35/56
This makes Chainflip unique and well-secured from other cross-chain Protocols.
While all these operations happen in the Chainflip ecosystem, Knowing it occurs at the state chain is essential.
36/56
The State Chain
This simply portrays the application of BaaS (Blockchain as a Service).
In summary, it is an application-specific blockchain designed for the Chainflip ecosystem.
37/56
The state chain has its own SDK that will allow DEVs to deploy Dapps or build on Chainflip Network.
Aside from that, the core key functions that occur in the state chains include:
38/56
• Witnessing deposits
• Broadcasting funds
• Validator Auctions, Bonds, and rewards
• Reputation and Slashing
39/56
Witnessing deposits (Incoming Txn)
In the Chainflip State Chain, Transaction occurs at the external chain, monitored and picked by validators.
The criteria for picking the txn is after it has been confirmed and added to a block for the supported blockchains.
40/56
The deposit is considered final when the block is detected on the supported blockchain, and only 100 validators are needed to reach finality.
41/56
As how optimistic rollups work when verifying a txn, a fraud-proof is submitted to prove txn computation, and if not verified correctly, the validator is penalized and slashed.
42/56
This also happens when the validators fail to process the txn within the defined time limit.
43/56
Broadcasting funds (Outgoing Txn)
This has to do with how Chainflip now creates, signs, and broadcasts the txn out of the protocol, which can be sending the output token to the user’s destination address, sending assets to LP withdrawing their collateral e.t.c
44/56
Here, the txns are batched to save gas fees and to reduce the no of signing ceremonies required, which is based on the Threshold Signing Scheme (TSS).
So, when the signing ceremony is completed, the txn is reported back to the state chain and ready to send.
45/56
Now, a validator is appointed to broadcast that signed txn to the destination chain, and in case the appointed validator can’t fulfil this for any reason, the failure is reported back to the state chain, and another validator is appointed to do that.
46/56
It is also keen to know that Chainflip TSS uses the FROST (Flexible Round Optimized Schnorr Threshold) Multisig scheme for fast and scalable MPC.
It is used because of the large no of validators in the system and to secure all vaults.
47/56
FROST is the best when it comes to maintaining decentralization, unlike THORChain’s GG20, which often forces Individual validators to hold user funds on their own hot keys.
48/56
Overall, Chainflip will be the first the use the FROST signature scheme, which gives it the advantage of allowing validators to run on less expensive hardware while not sacrificing security.
49/56
The $FLIP token
In Chainflip’s State Chain, State Chain accounts are used to submit external txn activities on the network
All is done through the Chainflip gateway smart contract, which is being monitored by the network and still controls the supply and economics of the $FLIP token.
52/56
Validators use $FLIP to place bid auctions for the highest validators that complete keygen to be selected as Authority Set validators
The Authority Set validators are responsible for block production/inclusion, consensus witnessing, threshold signing and txn broadcasting.
53/56
Not just that, $FLIP is also used to reward the different types of validators in the Chainflip network.
LPs also use $FLIP to fund their on-chain account for the State Chain, which is needed to pay for gas fees when placing and updating orders.
54/56
Brokers who are responsible for constructing and submitting deposit requests to the blockchain on behalf of end users aim to do that so as to lessen the user’s burden of having to include complex txns metadata which would result in increasing gas fees for users.
55/56
These brokers also pay a small state chain txn fee in $FLIP every time they submit a txn to the state chain.
All txn fees on the State Chain are burned, which brings more value to $FLIP.
56/56
Chainflip Isn’t live on Mainnet yet, and I’m keen to explore it more when it’s live on Mainnet and validate my research
That's a wrap, If you love this thread, you'll simply love my newsletter where I do write weekly on the present state on L2s
Web3 is all about decentralization while also achieving privacy
You might have been more exposed while using web2 Browsers
Here’s how @trycarbonio aims to be the ultimate privacy focused web3 Browser: 🧵
1/ Using web2 browsers for web3 services doesn’t facilitate the growth of web3 and now we’re seeing the emergence of web3 Browsers strongly competing against web2 Browsers.
If you’re familiar with Brave, then you should check out Carbon as they’re about to onboard the next wave of users to web3
There are lots of flaws in web2 Browsers today and this In turn doesn’t provide a seamless user experience to web3 Users.
Every trader's aim is to maximize profit and minimize fees
The best way you can do that is through Aggregators
Here’s your guide to all DeFI Aggregators:
In this thread, I’ll walk you through:
• What is an Aggregator
• Why use an Aggregator
• Types of Aggregator
• Aggregator Protocols by Category
1/ The amount of individual protocols in DeFI across different chains has neared thousands in the past years and this wouldn’t stop if we don’t unify liquidity.