DeFI Saint 🦇🔊 Profile picture
Jun 26 57 tweets 8 min read Twitter logo Read on Twitter
The Era of wrapped tokens is coming to an end.

Previously, BTC to any blockchain = WBTC ❌️

Now BTC to any blockchain = BTC ✅️

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:

• Minimal slippage
• Better market pricing and
• Low fees
31/56

How buddy?

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
50/56

These activities can include:

• Validator auctions
• liquidity update
• Broker transaction
• Governance
51/56

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

Subscribe as it's totally free

thedefisaint.substack.com
One more thing, I spent 96hrs+ on this research to simplify the core tech of Chainflip which is quite complex, so everyone can easily understand.

Please kindly leave a like and retweet to the first post and also follow me @thedefisaint for more Alpha

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with DeFI Saint 🦇🔊

DeFI Saint 🦇🔊 Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @TheDeFISaint

Jun 14
.@GainsNetwork_io just on Arbitrum alone recently surpassed $10B trading vol irrespective of the Bear Market.

Gains Network's most significant months are coming after it received 1.9M $ARB Airdrop and its new v6.3.2 upgrade.

To position ahead, Here's all you need to know: 🧵 Image
1/ You can't talk about Perp DEXes in DeFI without mentioning Gains Network.

The previous Perp DEXes narrative that brewed was after the FTX collapse.

Since then, Gains Network still shows its prowess to dominate the Perp DEXes Category

l.gains.trade/b0bdd3b7f
Gains Network is the only decentralized leveraged platform that offers trades on Crypto, Forex, and Commodities.

Gains Network cumulatively on Polygon and Arbitrum has done a total vol of $40B

According to DeFILlama, Gains is ranked 3rd by TVL. Image
Read 29 tweets
Jun 12
The TVL of LSDs across all chains has reached $19.79B

Ethereum has the largest share with $17.84B and Lido constitutes the largest with $13.37B

LSDFI protocols are where the next money will flow

Here's who stands a chance to capture all stETH share: 🧵 Image
1️⃣ 18.77% supply of ETH has already been staked which amounts to a total of 22.3M $ETH.

The Shapella upgrade led the LSD narrative and the LSD narrative is paving the way for the LSDFI narrative.
LSDs are still looking for more yields and over $403M LSDs are currently locked in LSDFI protocols Image
Read 28 tweets
Jun 10
The Almanck of Naval Ravikant is one of the best books on wealth and happiness

How to get rich without getting lucky summarizes it all

Here are the 12 most significant ones I've found to always keep you in check: Image
I'm inspired by Naval's lifestyle and dreams, and my long-term term goal in this industry aligns with that of Naval

Also, I equally summarized them based on my understanding.
1/ Seek wealth, not money or status.

Wealth is having assets that earn while you sleep. Money is how we transfer time and wealth. Status is your place in the social hierarchy.

Summary: Wealth comes with several investments
Read 17 tweets
Jun 9
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: 🧵 Image
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.
Read 20 tweets
Jun 2
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: Image
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.
Read 22 tweets
May 16
Soon, we'll bid farewell to the Era of having to lose your seed phrase means losing your account

Account Abstraction will forever change the Blockchain industry

The next billion users won’t have to write 12 words on paper again

Here's all you need to know about AA: Image
Before we deep dive into the concept of account abstraction, The way accounts have been operating is often mimicked to “one fits all”.

Imagine in clothing “one size fits all” It shouldn’t be the same as how accounts should operate in this web3 industry.
The need for AA arose as a result of so many incompatibilities in how the Ethereum account works

Ethereum accounts are of two types:

• Externally Owned Accounts (EOA)
• Contract Accounts (CA)
Read 28 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(