You would lose ~$7M to fees + slippage when executing a large trade of $100M on @Uniswap even in the most liquid pairs (ETH / USDC)

This is a blocker for Institutional DeFi Adoption.

Here's a solution 👇 🧵
@Uniswap @paradigm's research partners @_Dave__White_, @danrobinson and Uniswap founder @haydenzadams are solving this with Time-Weighted Automated Market Makers (TWAMMs).
@Uniswap @paradigm @_Dave__White_ @danrobinson @haydenzadams Trades in TradFi are executed through an order book mechanism.

In DeFi, trades are executed through a revolutionary liquidity pool-based model known as Automated Market Makers or AMMs.

This enables high-scale permission-less transfers.
@Uniswap @paradigm @_Dave__White_ @danrobinson @haydenzadams Executing a small $1000 USDC/ETH trade costs ~0.2%

However, for large trades like $100M for the same pair, one would have to pay ~7% ($7M) in fees which could go up to $18Mn sometime.

You would say why not break it into a FEW large sub-orders or MANY small sub-orders?
@Uniswap @paradigm @_Dave__White_ @danrobinson @haydenzadams Large sub orders would be vulnerable to price-impact and sandwich attacks.

Whereas small orders involve a lot of manual work and risk of active trading.

This creates a serious bottleneck for DeFi adoption by non-crypto native institutions and whales.

@Uniswap @paradigm @_Dave__White_ @danrobinson @haydenzadams Essentially, TWAMM breaks a large order into many infinitely small virtual orders (Time-weighted average price- TWAP), distributed over a long period which ensures low gas price and overall transaction fees.

There are 2 benefits of executing orders through TWAMMs:
@Uniswap @paradigm @_Dave__White_ @danrobinson @haydenzadams Smoothness

Price action on DEXs depends upon the size of trades being executed on them.

Decreasing the size of trades smoothens the price movement and ensures executions within the prevailing time-weighted average price.
@Uniswap @paradigm @_Dave__White_ @danrobinson @haydenzadams Efficiency

Calculating the transaction for multiple trades per block could be expensive. TWAMMs compute the outcome for traders in a single computation.

For e.g. Ken and Eric want to sell 100 and 200 ETH each for USDC. How would TWAMMs be implemented for such a case?
@Uniswap @paradigm @_Dave__White_ @danrobinson @haydenzadams Gas optimization

Orders of both Ken and Eric would be pooled together and then split into virtual sub-orders.

Individual balances of pooled transactions are tracked by algorithms similar to ones used for tracking LP rewards in yield farms.
@Uniswap @paradigm @_Dave__White_ @danrobinson @haydenzadams Long-term Order Expiration

In our example, we’ll have to perform two trade calculations - One for 1st 100 blocks and one after that.

Multiple transaction pooling would lead to multiple trade calculations eventually making it extremely gas inefficient.
@Uniswap @paradigm @_Dave__White_ @danrobinson @haydenzadams TWAMMs specify the minimum number of blocks that a transaction should take before expiry.
@Uniswap @paradigm @_Dave__White_ @danrobinson @haydenzadams Lazy Evaluation Technique

Whenever a new order is submitted, TWAMM retroactively calculates the effect of all the virtual trades that have occurred.

Order only interacts with TWAMM's embedded AMM, so it accurately calculates the results of all of the intervening virtual trades.
@Uniswap @paradigm @_Dave__White_ @danrobinson @haydenzadams Cancelling Long term orders

TWAMMs allow users to cancel their long-term orders at any time by paying their share of the gas fee.

Users can select the cancellation time for their order down to the block.
@Uniswap @paradigm @_Dave__White_ @danrobinson @haydenzadams We did not cover the mathematical implications of the TWAMMs model here.

If you wish to read more about them, here's the link for you

paradigm.xyz/2021/07/twamm
If you find this explanation informative and has helped you understand a complex topic, please give a Like and Retweet to the original tweet 👇

• • •

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

Keep Current with Magik Invest ✨

Magik Invest ✨ 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 @magikinvestxyz

Jun 4
A multichain world is more than just L1 clones

Here’s why Layer-2 solutions are essential to a truly multichain future 👇
Two years ago @VitalikButerin wrote in his post "A rollup centric Ethereum Roadmap"

“The base layer retrenches and focuses on doing a few things well - namely, consensus and data availability"

Let's understand how $ETH is building the multichain world

ethereum-magicians.org/t/a-rollup-cen…
@VitalikButerin A Blockchain like Ethereum has 3 tasks

1. Execution - Execute the smart contract logic & turn it into transactions

3. Data Availability - Store accounts, transactions & blocks that happen on chain

2. Consensus - Make network agree on what to include. It's PoW now, later PoS
Read 13 tweets
Jun 1
The @optimismPBC token $OP has finally been airdropped.

We did a deep dive to provide you with an easy explanation of the OP token’s intrinsic value

[1/x] 🧵👇
@optimismPBC $OP token is not a utility token meant for paying gas fees on @optimismPBC.

Rather, it’s a powerful governance token to achieve @optimismPBC's vision to become fully decentralised.
@optimismPBC Wait - isn’t Optimism already decentralised?

The Sequencer for the Optimism chain is governed by the @optimismPBC team right now.

It is the primary source of protocol revenue.
Read 16 tweets
May 30
@VitalikButerin wrote an article about stablecoins after the UST crash.

Turns out USDC is not a stablecoin!

Here is a TLDR thread on stablecoin fundamentals according to Vitalik 👇
@VitalikButerin What is an automated stablecoin?

1. It should track a certain price, say $1, but in reality could be any price, 1 Euro or even a daily changing value.

2. The price should be maintained in a decentralised automated manner.
@VitalikButerin Is USDC a stablecoin according to this definition?

NO.

Because:-

1. One entity (Circle) maintains an equivalent treasury of US Dollars with them for each USDC minted

2. You can redeem USDC for $1 through circle but there is no automated way to do this
Read 15 tweets
May 29
Tokenomics is the foundation of every project.

A project’s success or failure depends heavily on how its tokenomics is structured.

Here’s how you can evaluate a project’s tokenomics before investing in it.
1) Token’s intrinsic value

A Token’s intrinsic value is defined by the purpose it serves. The token must serve some use case within the ecosystem.

Either it should enable users to perform some actions or provide governance of the system.
One good example could be the @Ethereum blockchain.

Every transaction on the network requires users to pay gas fees in $ETH.
Read 10 tweets
May 2
Decentralized stablecoins are really trending right now.

We’ve compiled some 101 information that will help you understand these better.. 👇 🧵
Traditional Stablecoins

Stablecoins like $USDT, $USDC $BUSD are collateralized by US dollars.

These are made by centralized corporations but the exact distribution of the collateral assets backing them has been called into question a lot...
If you've been in crypto for a while, you'll know that Tether FUD is one of the greatest fears .

Ultimately, you have to trust these companies if you choose to use a centralized, collateralized stablecoin.
Read 16 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!

:(