Best Twitter threads of the day – September 12th by BitlyFool | Posted on September 12, 2022 Bitcoin hashrate at an all-time high BOOM! #Bitcoin hash rate all time high pic.twitter.com/4LEnzts82T— Dylan LeClair (@DylanLeClair_) September 12, 2022 16 months after the China mining ban which saw hash rate drop by ~50%, followed by a ~70% market correction in $BTC, hash rate is pushing new highs. Miner revenue per TeraHash is approximately down 80% from its 2021 highs and headed for new all time lows.(Note: chart in log) pic.twitter.com/rOpImlxzj5— Dylan LeClair (@DylanLeClair_) September 12, 2022 What does this mean for bitcoin? 1) Miner margins are squeezing hard2) The marginal production cost of $BTC has never been higher (although being impossible to exactly measure) $BTC is the only commodity in the world that becomes harder to produce as more people try.— Dylan LeClair (@DylanLeClair_) September 12, 2022 Fifty Gateway to power Starbucks Odyssey We are excited to announce that we have been chosen to power Starbucks Odyssey – a web3 and NFT-based evolution of the @Starbucks loyalty program— Nifty Gateway (@niftygateway) September 12, 2022 Through the Starbucks Odyssey experience, @Starbucks is aiming to onboard their members into web3 in an authentic and easy way. This is a monumental moment in web3 history.— Nifty Gateway (@niftygateway) September 12, 2022 .@NiftyGateway was chosen to make the experience accessible for anyone. Nifty Gateway offers secure NFT storage, credit card payment options, and customer support; making it super easy for anyone to get started with NFTs (even if you always forget your password ).— Nifty Gateway (@niftygateway) September 12, 2022 .@Starbucks is a pioneer in the loyalty and rewards space and we are so excited to partner with them to introduce the next chapter of Web3 utility and accelerate mainstream adoption of NFTs.— Nifty Gateway (@niftygateway) September 12, 2022 Thread on Liquidity Book Liquidity Book Learning #6Price Impact is something all DEX users deal with on a regular basis. It refers to a price change occurring during a swap and can sometimes lead to unexpected losses.But why exactly does it occur? pic.twitter.com/tKhGLhHYM8— Trader Joe | New AMM Soon (@traderjoe_xyz) September 11, 2022 Many decentralised exchanges use the x*y=k formula, where x and y are reserves of two tokens and k is constant, to price assets in their pools.To find a relative price of a token in a pair, we simply need to divide x by y or vice versa.— Trader Joe | New AMM Soon (@traderjoe_xyz) September 11, 2022 Let's say there is an AVAX-USDC pool with 1000 USDC and 50 AVAX in it. In this case, x is 1000, y is 50, k is 50000, and the implied price of AVAX is 1000/50=20 USDC.Alice wants to buy 100 USDC worth of AVAX and expects to get five tokens back.— Trader Joe | New AMM Soon (@traderjoe_xyz) September 11, 2022 In reality, however, she gets much less. Because Alice deposited 100 USDC, the x is now 1100 (was 1000), and y is 50000/1100=~45.45.Instead of getting the 5 AVAX that she expected, Alice only received 4.55 (50-45.45).The new price of AVAX is, therefore, 1100/45.45=~24.2 USDC.— Trader Joe | New AMM Soon (@traderjoe_xyz) September 11, 2022 So Alice paid almost $22 compared to the quoted price of $20, resulting in a price impact of ~9.8%. If price impact didn't exist, Alice could have bought all 50 AVAX in a pool for a total of 1000 USDC, leaving no more AVAX for future traders. This isn't ideal. pic.twitter.com/ztQuyRe3vf— Trader Joe | New AMM Soon (@traderjoe_xyz) September 11, 2022 However, such a significant price impact isn't ideal either. So was there something Alice could have done differently? Her swap was 5% of the size of the pool, so she would have gotten a better price by either finding a pool with more liquidity or by performing a smaller swap.— Trader Joe | New AMM Soon (@traderjoe_xyz) September 11, 2022 Alternatively, she could have used a DEX with a function different from the traditional xyk. For example, there are exchanges tailored towards stablecoins with reduced price impact.Concentrated liquidity can also help, due to its capital efficiency, enter Liquidity Book (LB)… pic.twitter.com/HVqJsKQAae— Trader Joe | New AMM Soon (@traderjoe_xyz) September 11, 2022 LB introduces Discretized Liquidity. Liquidity is separated into constant sum price bins with their own bonding curve.Because each bin has a fixed price, price impact while swapping only occurs during bin changes. Therefore swaps within 1 bin will incur 0 price impact. pic.twitter.com/aTjXmBEfSN— Trader Joe | New AMM Soon (@traderjoe_xyz) September 11, 2022 Overall, price impact remains one of the biggest topics in #DeFi and #DEX design.There are various different ways to minimise it, but traders must still stay vigilant when performing swaps, lest they want to end up overpaying for their tokens.— Trader Joe | New AMM Soon (@traderjoe_xyz) September 11, 2022