Improve your Crypto IQ (Part 1): Here are 6 compact explanations I’ve written to help you understand these technical terms: Interoperability, Arbitrage, Flash Loan, Liquidity Pool, Impermanent Loss, and UTXO

Cryptocurrency News and Public Mining Pools

Improve your Crypto IQ (Part 1): Here are 6 compact explanations I’ve written to help you understand these technical terms: Interoperability, Arbitrage, Flash Loan, Liquidity Pool, Impermanent Loss, and UTXO

Introduction

This is the first part of a multi-part guide in which each installment will cover 6 technical crypto terms with digestible ELI10 explanations. Each installment's 6 topics will cover a range of difficulty and will be ordered from simplest to most advanced.

The 2nd installment should come out within the next couple days, and will cover sharding, optimistic rollups, zk proofs, maximal extractable value (MEV), directed acyclic graphs (DAGs), and liquid staking derivatives (LSDs).

Feel free to comment suggestions for what I should cover in the 3rd installment.

Interoperability

Interoperability refers to the ability for different blockchains to interact with one another, rather than each chain being its own isolated ecosystem. Interoperability is generally achieved with bridges, wrapped tokens, and hubs. Bridges between two blockchains allow native assets from one chain to get locked up at the bridge while an equal amount of the “wrapped” version of that asset gets minted on the other side of that bridge, allowing you to play with a tokenized version of an asset in an ecosystem where it is not native (like WBTC, the wrapped version of BTC that lives on the Ethereum network). Wrapped tokens can always be redeemed by sending them back to the bridge. There, they will be burned while the corresponding native assets get released from lockup back on the native side of the bridge. Hubs are basically big intersections of bridges that involve many chains, and are more efficient than bridging each individual blockchain to every other blockchain.

Some people consider some of the older bridges like the BTC/ETH bridge to be concerning because those bridges require a trusted centralized entity to be the custodians of the locked assets at the bridge and ensure the 1:1 ratio between (for example) BTC and WBTC.

Some of the big projects that are trying to turn the crypto world into a single interoperable ecosystem are Polkadot, Cosmos, and, more recently, Chainlink with its CCIP. Here is my in-depth guide to understanding interoperability.

Arbitrage

Arbitrage is a strategy that involves noticing that some asset is trading at different prices on two exchanges. When such an opportunity is spotted, an arbitrage trader will buy on the cheaper exchange and sell on the more expensive exchange, pocketing the difference (which is hopefully higher than the fees they had to spend). This will bring the price down on the more expensive chain and bring the price up on the cheaper exchange, pulling the prices on the two exchanges back in line. Arbitrage traders are the reason prices generally stay consistent across exchanges; without the gravitational effect of arbitrage trades, prices would be independent and divergent across all exchanges.

So, arbitrage isn't just a clever way that some people turn a profit; it is the fundamental force that keeps prices across hundreds of CEXes and DEXes more or less in agreement. They are the mechanism by which price divergences are perpetually self-healing.

These days, the arbitrage world is very competitive, with tens of thousands of bots all searching for the same opportunities and trying to beat each other to the punch. Many arbitrage traders use flash loans to multiply their profits. Arbitrage is an example of maximal extractable value (MEV), which will be explained in a later installment of this series.

Flash Loan

A flash loan is a type of pseudoanonymous, uncollateralized, smart-contract-based loan that exists on several smart contract blockchains like Ethereum and BSC. They allow people to take enormous loans (size is only limited by lender liquidity; so far there has been at least one flash loan as large as a billion dollars) from strangers without KYC or collateral. But there are two main limitations:

  1. You can not move the assets out of the smart contract ecosystem they are in.
  2. You must pay back the principal along with interest in the same transaction that you borrowed it in. If you fail to do so, then the entire transaction (including the part where you borrowed the funds) fails, and in fact never happened (due to something called transaction atomicity).

So, from the blockchain's point of view, you borrow and return the funds in the same instant. In real terms, since Ethereum block time is about 13 seconds, you can think of the time between when you sign the transaction and the time when the borrow and return operations are added to the blockchain to be as little as 13 seconds. In between the borrow and the return operations that mark the beginning and end of the transaction, you can do whatever you want with the funds to try to turn a profit (besides moving them out of the ecosystem). Most flash loans either try to take advantage of an arbitrage opportunity, or try to exploit some DeFi protocol (ie: flash loan attack). In any case, if you fail to profit enough to return the principal and interest by the end of the transaction, then you never borrowed it in the first place. It's kind of like Schrödinger's loan.

Note that you do have to pay for gas whether your transaction succeeds or not, so the one risk you take on by getting a flash loan is ending up paying gas for nothing. Here is my in-depth guide to understanding flash loans.

Liquidity Pool

Liquidity pools are the mechanic at the heart of automatic market makers (AMMs) that allow us to have decentralized exchanges. They are the alternative to order books, which are the mechanic used by centralized exchanges. Liquidity pools allow decentralized, peer-to-peer, non-KYC trading. They are the central innovation at the core of DeFi.

Each liquidity pool corresponds to a single asset pair, like ETH/USDC, and they allow those two assets to be traded in either direction. Such a pool is at all times filled 50/50 with ETH and USDC, in terms of value. The pool's liquidity is provided by anyone who wants to participate, and the incentive to do so is that the providers earn the trading fees from anyone who uses the pool to trade (providers earn a % of the pool's trading fees in proportion to how much of its liquidity is being provided by them).

Whenever somebody wants to buy ETH with USDC, they take the ETH from the ETH side of the pool and add USDC to the USDC side of the pool to pay for it (plus a little extra for the fee), and vice versa if they want to buy USDC with ETH. Trading against the pool thus changes the ratio of the two assets in the pool, which means their prices will shift in the opinion of the pool (since the pool always considers its two sides to be of equal value, if the ratio between the two sides shifts, that means the prices have shifted in the pool's opinion). If the price of the assets in our pool becomes misaligned with prices for those assets in the rest of the world (due to the ratio shifting in our pool when people use it to trade) then arbitrage traders buy the underpriced asset from our pool and sell the overpriced asset to our pool, bringing our pool's local prices back in line with the rest of the world.

The main risk liquidity providers are exposed to is something called impermanent loss, covered in the next section.

Here is my in-depth guide to understanding liquidity pools.

Impermanent Loss

Impermanent loss (IL) is a way that liquidity providers can lose money by providing liquidity to a pool relative to if they had just held the two assets instead. Impermanent loss happens whenever the prices of the two assets in the pool change relative to each other. If they go up or down together, or stay still together, then there is no IL. If one of the assets moves in price while the other stays still, or they move in opposite directions, or even in the same direction at different speeds, then there will be some IL. The further the two assets' relative price moves from what it was when you started providing liquidity, the more IL you will experience. If the price ratio eventually returns to what it was when you started providing liquidity, then the unrealized IL reverses itself (so it's not cumulative; IL can both grow and shrink).

The intuitive reason for why impermanent loss happens is this: whenever one of the assets performs better than the other, traders will naturally trade against the pool in such a way that it will rebalance to have fewer of the better-performing asset and more of the worse-performing asset. So, when you withdraw from the pool and reclaim your assets, you will get fewer of the better-performing asset than what you put in, and more of the worse-performing asset than what you put in.

So, IL is an emergent process that comes from liquidity pools rebalancing their ratios whenever relative prices change, which causes liquidity providers to be more exposed to the worse-performing asset and less exposed to the better-performing asset. It is much easier to understand with a concrete example, so I recommend checking out the link below to get a deeper grasp of the concept.

Here is my in-depth guide to understanding impermanent loss.

UTXO

UTXO stands for unspent transaction output, and it is a type of data package that sits at the core of how Bitcoin operates (as well as some other chains, like Litecoin and Cardano). The UTXO Model is as opposed to the more intuitive Account Model (used by many chains including Ethereum) in which each address's balance is recorded in every block.

In the UTXO Model, we don't keep track of balances directly, but instead we can figure out an address's balance by adding up all the UTXOs currently associated with that address. A UTXO is like a little data packet that is linked to an address and which represents a specific amount of BTC, like 0.034 BTC, or 0.67 BTC. They are basically like a BTC check.

Here's an analogy: imagine only $1 coins exist. No other denominations. You want to buy a $1.60 eggplant. You give 2 coins to the teller, and they must write you a $0.40 check for change. The 2 coins were the inputs of the transaction, and the check is the output. This output is equal to the amount of your input that was not spent, hence “unspent transaction output”. You can imagine that as you go about your day, you acquire more of these checks for random amounts, and eventually you use 3 checks whose total is $3.50 to buy a $3.20 honeydew melon. You input those 3 checks into the transaction, and a new $0.30 check is created by the cashier as an output of the transaction and given to you. So, now you can see how outputs from old transactions can be used as inputs for new ones.

Now let's make this analogy more accurate: imagine that when you gave 2 coins to the teller for a $1.60 eggplant, instead of the 2 coins going in the till and a $0.40 check being given back to you, imagine the 2 coins got deleted, and two checks were created: one for $1.60 which goes into the till, and a second worth $0.40 that goes back to you.

Now I want you to go one step further and imagine that there were never any coins in the first place. All there ever are are checks for various amounts, and when they get used as inputs, they are destroyed*, and new checks are created in their place as outputs.
*well, they are kept in a filing cabinet as records, but they get a big X written on them so they can never be spent again.

This is what UTXOs are, and this is how Bitcoin accounting works. A BTC address is really just a big pocket full of bitcoin checks for various random amounts that get consumed as inputs of transactions and created as outputs of transactions.

There are advantages and disadvantages to the UTXO Model and the Account Model, but that is outside the scope of this explanation.

Stay tuned for the next installment!

submitted by /u/pseudoHappyHippy
[link] [comments]