Res ®️ Profile picture
Aug 31 33 tweets 10 min read
1/ Enabling cross-chain composability: how @NEARProtocol’s Nightshade will disrupt DeFi

A thread 🧵👇
2/ This thread aims to provide the main takeaways from the more extensive research by @proximityfi that I personally wrote and you can find here

I've tried to make it as simple to understand as possible…
3/ The article delves into

1. Composability & its importance
2. Interoperability
3. Cross-chain bridges vs Sharding vs NEAR's Nightshade
4. How NEAR achieves true scalability & enables cross-chain composability
5. Real-world applications

Let's start with basic definitions

Composability is the ability to combine distinct components to create new systems

It allows dApps/DAOs within the same chain to seamlessly communicate & work with each other as devs can freely use, modify & integrate open-source code in their apps
5/ Examples of composability:

- Token swaps
- Flash loans
- Governance
- Identity management
- LP position from a DEX as collateral in a Money Market
- Borrowing against your NFT or lending it out
- The ability to combine DeFi features w/ GameFi, DAOs & more Web 3.0 primitives

While composability allows for smart contracts to interact w/ others within the same chain; interoperability is the ability for chains to communicate among each other, even though they differ in consensus, data availability or block formation

It can be defined by combining the definitions of composability & interoperability:

Cross-chain composability is the ability for dApps & DAOs on different chains/shards to communicate and interact with each other in a permissionless and seamless way
8/ While composability is one of the biggest innovations of Web 3.0, interoperability is still a complex problem that many are trying to solve

Two main solutions have been proposed so far

1) Cross-chain bridges
2) Sharded blockchains

This thread focuses on sharded blockchains
9/ Cross-chain bridges effectively connect chains with different target use cases and properties that might not otherwise be compatible

But these bridges face the bridging trilemma and don't allow for cross-chain composability
10/ Solutions such as Stargate solve the trilemma and bring composability to the table as it can transfer native assets across chains

Yet it introduces other risks and major complexities such as exhaustion of LPs, rebalancing issues or widespread reversion

*more info on article
11/ Sharded blockchains arose to solve scalability & tackle the blockchain trilemma, a concept coined by @VitalikButerin

Sharding splits the blockchain into multiple chains (shards) and creates an ecosystem of heterogeneous blockchains that have a working interoperable subsystem
12/ Although sharded blockchains may solve scalability and offer an interoperable ecosystem, composability across chains is limited as

- Users constantly need to bridge capital
- There is fragmentation of liquidity, users, resources, etc.
- Message passing solutions are unproven

Nightshade is NEAR’s solution to scalability & cross-chain composability

Contrary to Cosmos or Polkadot, NEAR is a sharded blockchain modeled as a single L1: shards aren't different chains but smart contracts that can run optimized execution environments!
14/ As Nightshade doesn't use a Beacon chain but chunks, it allows NEAR to scale infinitely with the number of shards and dynamically (due to dynamic resharding)

To read more about sharding, Nightshade, chunks, etc you can read the full article or visit…

$Aurora & other shards aren't rollups but execution environments supported as smart contracts

Aurora tx's are actually wrapped into NEAR tx's that are sent to the Aurora contract

All settlement, data availability & execution are on NEAR
16/ As $NEAR is modeled as a single L1, smart contracts can be composed even if they are executing on different shards and running their code in different environments

For example, NEAR Native and EVM contracts are composable on NEAR’s mainnet today!
17/ It takes several transactions to swap across different L2s on Ethereum

But because NEAR is asynchronous & non-blocking, the user only sees 1 transaction when cross-shard contract calls are made from one environment to another
18/ This means that without bridging or any complicated UX, devs/users can use any execution environment that suits their needs:

you can run a smart contract for the EVM, a rollup, a new privacy environment or even a single app within a private shard for enhanced performance
19/ dApps get the benefits of running their own chain:

- Customization & flexibility
- L1 performance: instant finality, higher TPS
- Improved UX/UI: no bridging, direct access to concentrated liquidity
- Higher security

without extra work such as consensus, storage, validators

1) Forget about bridging

Even though users might be interacting with other shards, they won't notice since they will be on NEAR mainnet using their NEAR wallet

Capital doesn't need to be bridged when using a different shard or execution environment
21/ For example, you might be trading on @finance_ref but, if the quote is better on @trisolarislabs, the trade will take place on the Aurora environment and the user won't even notice

You can even trade tokens on NEAR Mainnet that are only available on Aurora!
22/ The Rainbow Bridge isn't needed for cross-shard contract calls: the UI just signs the required tx

This differs from cross-chain bridges built on omnichain protocols & from other sharded blockchains which do need to bridge from one interoperable chain to another

2) Say goodbye to fragmented liquidity

Unlike other scalability solutions, liquidity is NOT fragmented on NEAR

Users / devs can directly access liquidity across the whole NEAR ecosystem in a single tx thanks to the shared L1 for data & asynchronous base layer execution
24/ On ETH, you must bridge to Arbitrum to use a deeper LP

On NEAR, you can access all liquidity without leaving NEAR Mainnet, as DEX aggregators can trade across the whole ecosystem (ie. AMMs on Mainnet + AMMs on Aurora + Orderbooks on private shards + AMMs on a rollup)

3) Welcome concentration of dApps with true scalability

When an app becomes popular and congested, it may opt to develop its own chain

Or they might just want to make it more customizable and avoid the limitations of a simple EVM smart contract
26/ Such cases, among others, are dYdX or DeFi Kingdoms

So not only are we having a more fragmented ecosystem of blockchains but we are also now getting dApps that develop their own chain to get the performance & customization they need

That might eventually become a problem:
27/ Before, a user had to bridge their funds to use a new chain

Now, you also have to bridge your funds if you wanna use a specific dApp!

This is even true in the ETH2.0 + L2 scaling model where both liquidity & apps will be fragmented across a number of L2s
28/ This doesn't occur in NEAR

Orderbooks could move to a shard but traders wouldn't even notice the change!

This removes a huge barrier for mass adoption & offers a great opportunity for projects who aim for performance and customization without sacrificing user experience
29/ TL;DR (1)

- $NEAR is a sharded blockchain modeled as a single L1
- Shards aren't chains but execution environments supported as smart contracts
- Such execution, running on a shared L1 for data and async base layer execution, allows for true cross-shard composability
30/ TL;DR (2)

Such cross-shard composability offers:

- No need for bridging
- Concentrated liquidity across the ecosystem
- Instant guaranteed finality with single transactions
- Optimized quotes for traders
- Higher security in a more efficient market
- Improved UI/UX
31/ If you enjoyed this thread consider following @resdegen and @proximityfi and RT the main tweet!

There are more articles to come, if you wanna keep up with them stay tuned!


• • •

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

Keep Current with Res ®️

Res ®️ 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!


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 @resdegen

Aug 8
After recent events, it is time the crypto space develops a new stablecoin that is

- 100% decentralized
- censorship resistant
- truly resilient

In this thread I'll explain and summarize one interesting idea to issue a BTC/ETH-backed stablecoin using derivatives contracts 🧵👇
1/ Let's understand the motivation first


- The US sanctions Tornado Cash and following this event
- Circle blacklists Tornado cash addresses by freezing USDC
- Github suspends accounts of Tornado contributors

2/ USDC, USDT and BUSD are the biggest stablecoins in the market and they have an aggregated market cap of $138bn+

These stablecoins are issued by centralized entities

And the vast majority of "decentralized" solutions are also backed by these centralized stables
Read 25 tweets
Jul 29
While you are too busy with FOMC, CPI, unemployment data, GDP, recession, Powell, FED, Lagarde, Japan bonds, etc etc.

I just have notifications on for @Bitboy_Crypto

He is the HERO you don't deserve

He gave you a clear signal to max long at the bottom Image
Sometimes it's just this easy

The signals are so good that you don't even need to know anything about markets to make money

Don't overthink

Just follow Image
I don't disagree with the strategy to take profits on the way up but if we follow his high-success pattern... Image
Read 5 tweets
Jun 30
$USN v2.0 has just been announced:

"A flexible stablecoin that can adapt to any market conditions"

v2.0 Phase I Design: collateralized 1:1 with $USDT + offers a sustainable native yield thanks to $NEAR staking rewards

Keep reading 👇🧵

TLDR; $USN v2.0 shifts to a flexible model that will be split in 2 phases:

- Phase I: USN is 1:1 backed w/ USDT and offers a sustainable native yield obtained from NEAR staking rewards

- Phase II: USN will also be collateralized by non-stable assets, starting w/ NEAR

In this thread we will understand:

1⃣ Why $USN v2.0 was released
2⃣ What is $USN v2.0 and how does it work
3⃣ How the APR depends on pure offer / demand mechanics by the market
4⃣ Arbitrage opportunity
5⃣ Roadmap & use cases

Read 24 tweets
Jun 19
$USDD might go down to $0.85, but it must stay above $0.85

JustLend shows that $USDD is $1. It seems this is hardcoded

As Collat. Factor = 85%, this means that if USDD goes below $0.85, then ppl can buy worthless $USDD and borrow $USDC for a profit, draining the protocol
Things don’t look good

I wouldn’t touch it. Collateral in stablecoins is higher than USDD in circulation

However, if they buy USDD they are spending money
They minted USDD out of TRX. It doesn’t cost them anything.

As a redemption mechanism does not exist for the market to profit, they need to spend USDC to send USDD back to $1

That would actually cost them money
Read 5 tweets
Jun 15
1/ Given the market situation & extreme fear, you might be tempted to short $TRX due to the $USDD depeg at $0.96-0.97


Pls understand the math first 👇🚨
2/ I don't precisely like their tactics, you know that. The problem is always how they convey information


- $USDD is +158% collateralized by $USDC & $USDT
- Adding $BTC @ $20k, Collat. Ratio increases to 197% (it doesn't rly matter given the stablecoin collateral)
3/ But then, why is $USDD trading at $0.96-0.97?

The reason is because there is no redemption mechanism and therefore no arbitrage opportunity:

if you buy 1,000 USDD with 960 USDT, you can't get $1,000 worth of TRX/BTC back or directly 1,000 USDT
Read 19 tweets
Jun 13
1/ Update on $USDD 👇

I just woke up and saw that USDD has slightly depegged to $0.97

Now trading at around $0.98 Image
2/ The Curve pool for $USDD - 3CRV is getting unbalanced

$USDD = 82.82%
3CRV = 17.18%

Even the native, which has deeper liquidity, is getting more unbalanced:

$USDD = 60.94%
$USDT = 39.06% ImageImage
3/ This is the orderbook in Huobi, and looks empty

The liquidity is very thin: $577k at $0.97

Below that... unless MMs step in to fight the peg, it would get destroyed

There's definitely some sell pressure here as well. Probs because they are keeping an eye on on-chain pools ImageImage
Read 13 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!


0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy


3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!