Welcome, reader, to a whimsical Decentralized Finance (DeFi) adventure. I am Trader Joe, your guide through this maze of modern finance magic. DeFi can often seem bewildering with its jargon and complexity. So this content series aims to demystify a few of the popular core concepts of DeFi services. I’ll help you grasp not just the 'how' but the 'why' behind the actions you take, the goal is to equip you with key knowledge that will help you confidently navigate your DeFi adventure.
You’ll learn about: AMMs, DEXs, NFTs, Bridges Yield Farming, Impermanent Loss.
So grab your hat and join me, Trader Joe, as we turn the complex world of DeFi into an adventure, we’ll make sense of automated market makers, NFTs, bridges, yield farming and more.
Chapter 1: What Are These AMMs You See?
Welcome, welcome, step right up and see, The magic of AMMs, oh what they can be, In the land of DeFi, far across the sea, Lies a clever little thing called an AMM, you see…
What Is an AMM, You Might Inquire?
An Automated Market Maker (AMM) is an algorithm built into a smart contract. An AMM gives you the ability to trade tokens on a Decentralized Exchange (DEX), in a fully automated manner that utilises a mathematical formula to determine the price for your swap and execute your trade.
How Does This Magic AMM Work? Tell Me Do!
An AMM operates using liquidity pools, these are essentially a big digital pot of tokens. Anyone can add tokens to this jar or take some out in exchange for different tokens. When you perform a trade on a DEX, you're not defining a price yourself or waiting for someone to meet your price and you’re not submitting an order to a market maker. You’re actually just interacting directly with a ‘Liquidity Pool’ and the AMM algorithm is taking your trade instruction executing it immediately at based on the current prices defined by the current market supply and demand of the token you are trading.
Why, Oh Why, Are AMMs So Grand?
Accessibility: Decentralized Exchanges using AMMs are open 24/7, always.
Efficiency: Trades are executed instantly and seamlessly so users always get a great experience.
No Counterparties: No middlemen/counterparties are needed. Smart contracts do it all.
🐤 The Decentralized Exchange for You: https://traderjoexyz.com/
As this chapter closes, don’t you sigh, for there’s more to learn, under the DeFi sky.
Chapter 2: Trade-Trade Tiramisu
Step right in, don't be shy, it’s time for another slice of DeFi pie! In this chapter, we’ll peel back layer-by-layer and uncover the sweetness of trading onchain.
What’s This ‘Trade-Trade’ Tiramisu? You Might Wonder
Trading ‘onchain’ means buying and selling tokens directly on a blockchain network. When you trade onchain, you do this by using a decentralized exchange (DEX). The DEX processes your trade instruction through an algorithm such as an Automated Market Maker (AMM) or another type of algorithm built into a smart contract. The key point here is that your transactions are fully automated via smart contracts, eliminating middlemen and other forms of transaction handling. All trades are immutably recorded on a public ledger (blockchain) when performed. Delicious.
How Does This Delicious Dish Work? Dive In!
Just like making a real tiramisu, each layer of a trade relies on the one below it. When performing a trade on a DEX, there is a series of steps that are executed to complete the order:
Swap Instruction Submitted: Once you’ve setup your swap instruction and pressed ‘Trade’ your transaction order is sent to the blockchain
Validation of Broadcasted Transaction: The order is broadcast to the blockchain and miners (or validators) will validate the transaction and add the order into a block, ensuring it is secure and immutable.
Smart Contract Execution: The DEX smart contract takes the instruction and interacts with the AMM Algorithm to determine the swap rate, based on the current liquidity in the pool.
Liquidity Pool Interaction: The smart contract then interacts with the liquidity pool directly, taking out the requested tokens to be bought and refilling it with the tokens being sold.
Transaction Confirmation: Once the swap is executed, the blockchain confirms the transaction and the network reaches a consensus on the transactions validity. This process finalizes the transaction on the blockchain.
You Receive Tokens: Once your transaction is finalized, you now receive the tokens in your wallet.
🐤 Trading onchain? Visit Trader Joe: https://traderjoexyz.com/arbitrum
As We Close This Sweet Chapter our dessert plate clears, remember, the world of DeFi is near. With every layer you taste, you're closer to mastering the DeFi space.
Chapter 3: NFTs in the Whimsical Woods
This delightful chapter continues your DeFi adventure through the world of DeFi and into the whimsical woods where NFTs grow wild and free.
Welcome to the Whimsical Woods of NFTs
A Non-Fungible Token (NFT) is a unique digital asset that represents ownership or proof of authenticity of a specific item or piece of content, often stored on a blockchain. Unlike cryptocurrencies like $JOE or $AVAX, which are fungible and identical, NFTs are indivisible and unique, making each one distinct and irreplaceable.
How Does This Magic NFT Work? Tell Me Do!
Like all forms of tokens, NFTs function through blockchain technology. When an NFT is created, or "minted," a smart contract is executed that defines the ownership and manages the transferability of the asset. This smart contract stores detailed metadata about the NFT, such as its creator, unique traits, and ownership history, ensuring the authenticity and provenance of the digital item.
Why, Oh Why, Are NFTs So Grand?
Unique Ownership: Every single NFT minted onto a blockchain is unique, ensuring that if you hold this NFT, it is truly yours.
Authenticity: NFTs provide proof of authenticity, each NFT a unique and irreplaceable item. There is only ever one.
Monetization: NFTs have in-built royalties to the contracts, enabling artists to directly monetize their work by earning royalties automatically on all transactions that take place, forever.
No Middlemen: NFTs can be directly transacted between creators and consumers, eliminating predatory middlemen that can take large fees or take a big share of royalties.
Community Building: Communities often build and connect through NFTs, aligning under shared identities with profile pictures or collecting certain types of art from creators.
Future Use Cases: Potential applications include real estate, vehicles, and other assets such as land. NFTs have widespread use for real world assets.
🐤 Trader Joe Favourite NFT Marketplace: https://joepegs.com/
As we leave the whimsical woods of NFTs, our journey takes us across the great divide where we enter new lands and delve into the infrastructural feats that are known as bridges.
Chapter 4: Across the Great DeFi Divide
It’s time to enter the realm of the blockchain bridge, explore infrastructural marvels that connect different blockchain ecosystems by bridging across great divides.
What Is a Blockchain Bridge? You Maybe Be Asking!
A ‘bridge’ is a piece of blockchain technology that allows different blockchain networks to communicate and interact with each other. Just as the internet connects different computers and networks, allowing them to communicate and share data, a blockchain bridge connects different blockchain networks, enabling them to share tokens.
How Does This Magical Bridge Work? Let’s Find Out
Bridges are broken down into the below key infrastructural pieces that all work independently but together as part of a larger framework that facilitates token transfers across to different ecosystems in a decentralized and safe manner.
Endpoints: Each blockchain involved has an endpoint, which is managed by smart contracts. These endpoints act as the points of communication. These are essentially mailboxes between different houses.
Oracles: Oracles are third-party services that read the necessary information (like block headers) from one blockchain and send it to another. This ensures that the data is accurately transmitted. Think of an Oracle as a mailman in this analogy.
Relayers: Relayers work alongside oracles to fetch proof of specific transactions and deliver this proof to the destination blockchain. They operate independently from oracles to enhance security.
Ultra Light Node: Nodes are like the storage facility, keeping only the very necessary information on demand using decentralized oracles. This approach makes the process faster and more cost-effective.
Why, Oh Why, Are Blockchain Bridges So Grand?
Bridges are like highways that connect bustling cities, allowing quick transfer between them. By connecting these hubs, bridges enable greater interaction and activity across different blockchains, much like highways facilitate logistics. This connectivity reduces congestion on primary roads, such as the Ethereum blockchain, leading to a better user experience and more room for new developments. Bridges also help DeFi builders by creating new growth opportunities, further enriching ecosystems with added diversity, and also boosting transaction activity, much like how highways help to stimulate economic growth. Bridges help build.
🐤 Trader Joe and his favourite bridge: https://stargate.finance/transfer
As we cross the great divide with blockchain bridges, our journey continues to uncover the vast and interconnected landscape of DeFi technology, where the possibilities of yield yodelers are indeed great.
Chapter 5: The Tale of the Yield Yodelers
Lets journey deeper into the hills of the yield yodelers, you may have heard the term ‘yield farming’ and you’ve probably wondered at some point what it explicitly means in DeFi. So let’s hear the tale of the so-called Yield Yodelers.
What Is Yield Farming? You Might Wonder
Yield farming is a way to earn rewards with your tokens, akin to earning interest. Traditionally, you might deposit money into a bank account to earn interest. In the world of DeFi, yield farming does the same but on the blockchain. It involves engaging in activities like providing liquidity, staking, or lending your tokens.
How Does This Magical Yield Farming Work? Tell Me Do!
Yield farming can involve a few steps:
Provide Liquidity: Depositing tokens into liquidity pools on platforms such as Decentralized Exchanges like Trader Joe or Merchant Moe.
Receive Liquidity Provider (LP) Tokens: In return for that deposit, you’ll receive back a receipt token.
Stake LP Tokens: These receipt tokens can then be staked into ‘yield farms’ where protocols distribute extra tokens, typically in the form of a ‘governance token’ like JOE.
Earn Rewards: Over time, users earn rewards based on the amount of liquidity that has been provided into the yield farm. This is the yield farming element.
🐤 The whole yield farming process typically flows like this: Trade > Pool > Farm.
Why, Oh Why, Is Yield Farming So Grand?
It is a great way for a user in Defi to earn attractive yield
Classic yield farming is typically referred to as ‘passive income’
Yield Farming was a very popular way to distribute tokens back in 21/22
As you provide liquidity to accrue rewards, you provide a valuable service to a DEX by enabling your tokens to be used for swaps from other traders
But Beware, Dear Farmer, of the Risks
While the rewards can be great, yield farming comes with its own set of risks:
Smart Contract Risks: Everything onchain has some level of smart contract risk from vulnerabilities in the code that can be exploited. Always check reputable sources to ensure protocols have been audited. Typically, established brands in the space will have good security track records.
Impermanent Loss: The value of deposited tokens can fluctuate, potentially leading to losses compared to simply holding the tokens. We’ll talk about this more below.
Market Volatility: High volatility in the crypto market can affect the value of both the staked assets and the rewards.
🐤 Merchant Moe has ample yield farming: https://merchantmoe.com/farms
Chapter 6: The Perplexing Puzzle of Impermanent Loss
Impermanent loss is unnecessarily perplexing for many. To understand impermanent loss, let’s delve into the intricacies of liquidity provision and how it affects liquidity providers.
I’m lost! Please explain Impermanent Loss.
Impermanent loss is like trying to complete a jigsaw puzzle where the pieces are constantly changing shape. When a Liquidity Provider deposits assets into a Liquidity Pool (like adding pieces to a puzzle), they hope the picture will come together nicely at the end. However, if the market value of these assets changes (like the puzzle pieces changing in colour or shape), the LP can end up with a different picture than expected.
Lets talk through an example:
The Setup: When a Liquidity Providers adds liquidity, they typically add equal parts of two different assets, such as 1 ETH and 1000 JOE. This is like starting a puzzle with pieces that fit perfectly.
Changing Pieces: If the market price of ETH increases, the value of the ETH pieces becomes larger compared to the JOE pieces. The puzzle pieces no longer fit in the same way it did initially.
Mismatched Puzzle: Because the pieces changes, there is now a mismatch in value which is what we call impermanent loss. It’s termed "impermanent" because it only becomes a permanent loss if the tokens are taken out of the Liquidity Pool. This action crystalizes the change.
The Result: While the puzzle pieces may not fit perfectly anymore, the LP has earned transaction fees from trades happening in the Liquidity Pool. The Liquidity Provider may have also earned yield farming rewards, which may boost overall yield further. Note, this might be overcome the potential gains lost due to Impermanent Loss.
Do LPs always lose? It’s important to highlight that, impermanent loss that could be suffered, is not an outcome that means the Liquidity Provider lost capital value, from the original deposit. Impermanent Loss is essentially an opportunity cost, where there could have been a larger profit if the end user decided to hold the tokens, rather than deposit into a Liquidity Pool.
Navigating the Hidden Forces Behind Impermanent Loss in DeFi
How does Impermanent Loss actually happen and what can prevent it
Volatility: The more the market price of the tokens swings, the more likely the pieces of the puzzle are to change shape. Volatility increases the risk of impermanent loss.
Correlation: Assets that move in similar ways (are highly correlated) are like puzzle pieces that tend to keep their shape relative to each other, such as BTC + ETH. Positively correlated assets, typically result in less potential Impermanent loss.
Fees: Transaction fees are like bonuses for continuing to play the puzzle game despite the changing pieces. High enough fees can compensate for some of the mismatch.
Time Horizon: The longer you are willing to wait, the more likely it is that you can see the puzzle stabilize into a new, albeit different, beautiful picture.
🐤 Checkout the risks section as a Liquidity Provider to learn more: https://support.traderjoexyz.com/en/articles/8570239-your-risks-as-a-liquidity-provider
In summary, think of impermanent loss as a trade-off when providing liquidity. You have the opportunity to earn transaction fees and possibly additional rewards, which could increase your overall gains. However, there's also a risk of losses if the prices of your deposited assets diverge significantly. For example, you might miss out on higher earnings if you had simply held onto the assets and their prices increased during that time. By understanding these dynamics, you can demystify impermanent loss and see it not as a fear-inducing risk but as a manageable part of your own strategy.
And now our tale has reached its end
…But fear not, dear friend, for there’s always more in the bend. In the world of DeFi, adventures don’t cease; they grow and transform, like a grand masterpiece. Trader Joe is here, a friend and a seer to guide you through as an adventurer, so clear.
👋👋👋👋👋
About Trader Joe
Trader Joe is a leading multi-chain decentralized exchange and the inventor of Liquidity Book, the most capital efficient AMM in DeFi. Trade your favorite tokens, access one-click yield farming and shop for the latest digital collectibles at the Joepegs NFT Marketplace. DeFi has never been easier thanks to Trader Joe.
$mother #iggy 2 1bil