, 19 tweets, 5 min read Read on Twitter
1/ What's happening in @UniswapExchange land? A thread about the #3 DeFi platform, by collateral locked. We're all learning here, so if I misinterpreted or misunderstood anything feel free to chime in (politely, please):
2/ First off, what is it? It's a protocol for automated exchange of ERC20
tokens on the Ethereum blockchain. It prioritizes decentralization and security and has eliminated rent extraction and censorship, enabling faster and more efficient exchange.
3/ Uniswap is open source, has no native token or platform fee and no incentives or special treatment awarded to early adopters or developers. Listing tokens is free and all smart contract functions are public.
4/ What's novel about it? Most exchanges maintain an order book and facilitate
matches between buyers and sellers, but Uniswap doesn't. The protocol is composed of an ETH-ERC20 exchange smart contract for each ERC20 token on the platform.
5/ Each of these contracts holds reserves of both ETH and the respective ERC20 token, creating an internal liquidity reserve. Trades are executed directly against these reserves. Exchange contracts are linked through the registry, allowing for direct token to token trades via ETH
6/ Unlike other DEXs where traders buy/sell based on prices + volumes in an order book, Uniswap's exchange contracts act as automated market makers, where prices are set automatically using the constant product market maker mechanism, which keeps reserves in relative equilibrium.
7/ The constant product market maker formula calculates the exchange rate at which a trade will be executed based on the size of the transaction and the amount the incoming trade will shift this ratio.
8/ For example, if an ERC20 token is being sold for ETH, the size of that token's
reserve in its exchange contract increases and the ETH reserve decreases. The mechanism shifts the reserve ratio to increase the price of the ETH relative to the token for future txns.
9/ This pooled model smooths out the order book and allows for narrower spreads, requiring less active management on the part of market makers. Set it and forget it, FTW! (For more on the upsides of a pooled model, see @alexhevans's recent piece:
placeholder.vc/blog/2019/4/9/…)
10/ But how does this actually work? Liquidity is added to exchange contracts via liquidity providers depositing equivalent values of ETH and ERC20 tokens into them.
11/ 1st liquidity provider to deposit into a contract sets its initial exchange rate by depositing an equivalent value of ETH and the respective token. If the ratio is off, arbitrage traders bring the prices to equilibrium (at the expense of the initial provider).
12/ When deposits occur, liquidity tokens (LTs) are created for the provider, so they can earn passive income from lending their coins to the reserves. LTs track the proportion of total reserves that each liquidity provider has contributed.
13/Liquidity tokens are ERC20 tokens themselves and are specific to a single exchange pair (there is no uniform native token for the platform). Providers can burn their liquidity tokens at any time to withdraw their proportional shares of ETH and ERC20 tokens from the reserves.
14/ When this happens, the provider's ETH and tokens are withdrawn at the current exchange rate (reserve ratio), rather than the ratio of their original investment. Uniswap itself does not take any commissions, but each txn by users is charged a 0.3% liquidity provider fee.
15/ This goes into the liquidity reserves to ensure that the total reserve size in the exchange contract continually grows with each trade. The fees also serve as a payout to liquidity providers when they withdraw their holdings of the reserves.
16/ Worth nothing also that Uniswap is very gas efficient. It uses almost 10x less gas than Bancor in ETH to ERC20 trades (440,000 vs 46,000 gas), and can perform ERC20 to ERC20 trades more efficiently than 0x (113,000 vs 88,000 gas).
17/ One drawback of the platform is that its automated market making mechanism makes it so that the larger a trade, the more price slippage occurs. The platform works well for smaller trades, but this makes it somewhat unusable for larger ones.
18/ According to @defipulse, there's now over 9.2M worth of value locked in Uniswap, which makes it the 3rd largest player in DeFi (after @MakerDAO and @compoundfinance, ahead of @lightning and @Dharma_HQ ). This is up from 500K at the start of 2019. Impressive growth! </fin>
** noting! 🤦‍♀️
Missing some Tweet in this thread?
You can try to force a refresh.

Like this thread? Get email updates or save it to PDF!

Subscribe to Arianna Simpson
Profile picture

Get real-time email alerts when new unrolls are available from this author!

This content may be removed anytime!

Twitter may remove this content at anytime, convert it as a PDF, save and print for later use!

Try unrolling a thread yourself!

how to unroll video

1) Follow Thread Reader App on Twitter so you can easily mention us!

2) Go to a Twitter thread (series of Tweets by the same owner) and mention us with a keyword "unroll" @threadreaderapp unroll

You can practice here first or read more on our help page!

Follow Us on Twitter!

Did Thread Reader help you today?

Support us! We are indie developers!


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

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

Become Premium

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

Donate via Paypal Become our Patreon

Thank you for your support!