Chapter 4:

Advanced DeFi Technology

Permssionless Money Legos

Chapter 3

Essential DeFi Technology

Chapter 5

A Bird’s Eye View

ZacharyZachary
27 July 2022
Jul 2022

Now that you’ve got a grasp of crypto fundamentals and DeFi’s essential technologies, let’s get into the more advanced concepts.

Today’s Agenda

Cutting Edge

Crypto and blockchain technologies operate at the cutting edge of technology, cryptography, finance, and macroeconomics, and have since crept into governance, art, publishing, science, and a growing number of other industries. Peer-to-peer transactions are crypto’s oldest use case and DeFi is a logical extension of that. In regards to DeFi, there are constantly new innovations being made that both enhance previous technologies and introduce new ones.

The open source nature of DeFi helps speed up the innovations and that opens doors to create new ideas, as well as vulnerabilities. With the amount of money on-chain (there’s been as much as $250 billion at its peak), there are plenty of opportunities for bad actors to behave badly.

Even though some of these are not dangerous, if you are going to use any of the following technologies, please do your own research (DYOR) beyond this article before you start.

Advanced DeFi Technology

Liquid Staking

Staking is a robust field within blockchain architecture that has many use cases. Prior to liquid staking, one of its downsides was the fact that a staked asset was not liquid, it could not be used as collateral or traded for something else. Cue liquid staking.

Liquid staking is the process of obtaining a liquid I-owe-you type of token that is supposed to trade on parity with the underlying asset that is being staked. This liquid token is a representation of the illiquid coin/token that is actually staked. The staking yields accrue to the liquid token and either affect the price or the number of one’s holdings – dependent on the liquid staking method involved.

Examples: Lido, Marinade

DEX Aggregator

DEXes in themselves have facilitated a paradigm shift in financial transactions. Millions of people have moved trillions of dollars worth of value through DEXes in the burgeoning digital economies developing across various L1s and L2s.

DEX aggregators are protocols that connect to a variety of DEXes and find the most liquid and highest returning swap rates possible. These can be used for cryptocurrencies as well as NFTs as NFT marketplaces can be aggregated in the same way fungible token DEXes can be.

Examples: Jupiter, 1inch , Gem

Yield Aggregator

Yield aggregators function in similar ways to DEX aggregators. They hunt for the best possible yields available on the protocols they’ve integrated with. This saves Yield Farmers time from having to check all of these protocols individually although it does add another layer of trust needed in the code within the smart contracts involved.

Examples: Tulip, Beefy

Launchpads

Launchpads are applications built on blockchains that allow new tokens to have an ICO (initial coin offering). ICOs are like IPOs (initial public offerings) in that they introduce a new market by providing liquidity to a new asset. Below is an example of how a launchpad may work.

A new token is launching. In order to participate in the ICO, investors will have to have 100 of the launchpad’s tokens staked to the platform for the 3 days prior to the launch. There may be a fixed amount of allocations or if there is major investor interest, then there may be a lottery function that gives tickets for a specific amount of the new token to a select number of staked ICO participants.

As is the case with all DeFi protocols, there are many launchpads across all major blockchains and they all vary as to how they function.

Examples: Raydium, Polka Starter

Bridges

Bridges connect one blockchain to another and let users bridge assets between the two. They are somewhat controversial because a few major hacks have taken place on bridges because they are large targets. The standard bridge consists of the token being transferred from one blockchain to another being locked up and wrapped.

Moving Ethereum tokens to the Solana blockchain, for example, requires the Ethereum tokens to be wrapped and distributed as WETH in order for them to function on Solana. The actual ETH is still locked up within the bridge’s smart contracts and is only released upon the relinquishment/burning of the WETH.

Arguments for bridges are primarily based on the idea that blockchains will scale if they’re interoperable together meaning their assets can freely move between each other. Arguments against bridges, like those made by Ethereum’s founder Vitalik Buterin, are primarily based on the idea that they’re not necessary nor safe.

Examples: Portal, Swim

GameFi

GameFi is a field that has expanded rapidly over the past few years. It’s full of acclaim and criticism as it varies widely in its execution. This includes the protocols that gamify DeFi mechanisms as well as the videogames that include digital economies built on blockchains.

The idea makes sense. If you buy a digital asset like a rifle skin in a centralized video game ecosystem like Call of Duty, then Call of Duty goes out of business or decides to remove that asset, then you lose it with no way of ever recovering it. This is an argument for NFTs as much as it is GameFi.

GameFi detractors will argue that digital sweatshops are being created where the bulk of users will naturally become places where incomes are so low that the most logical way to earn a living is to spend all their workdays playing a GameFi videogame. Along with the rest of crypto, it’s a nuanced topic.

Examples: DeFi Land, Axie Infinity, Star Atlas

Non-Custodial Portfolio Management Protocols

Non-custodial portfolio management protocols are applications that let managers trade investor funds in a non-custodial fashion. Investor funds are deposited into a manager’s fund but there is no way for the manager to withdraw them. Rather, the manager can trade them and the investor’s balance is subject to the ups and downs of the manager’s profits or losses. So, decentralized hedge funds of any size. To learn more about how these work, check out Solrise.Finance and its Gitbook.

Examples: Solrise, dHEDGE

DeFi Insurance

DeFi insurance can protect your assets from vulnerabilities such as smart contract attacks, smart contract failures, and more. There are many ways this can be configured and has been proven to work in many circumstances although not all.

Examples: Nexus Mutual, Solace

Synthetics

Synthetic assets exist in traditional finance in the form of synthetic positions where traders trade multiple instruments in a specific way to mimic another financial instrument. Synthetic assets in decentralized finance vary in how they’re constructed and they too mimic the price action of another asset. They do so through the use of oracles which are programs that calculate and implement real-time value changes (stock prices, weather, etc) into smart contracts.

Examples: Synthetify, Synthetix

On-chain Identity / Soulbound NFTs / NTSTs

As dramatic as the name sounds, the impact that NTST (non-transferable social tokens) can have on social networks and blockchains at large is difficult to comprehend. While public key wallet addresses introduced financial pseudonymity and custom domain protocols like ENS and Bonfida introduced tailored financial pseudonymity – Soulbound NFTs / NTSTs have the potential to introduce a real on-chain identity.

A wallet’s activity becomes its behavior which becomes its reputation which can become its resume. Credentialing protocols like Rabbit Hole are likely going to become more important as more emerging and frontier markets are onboarded to blockchains. An example of Rabbit Hole’s impact is its

Official paper: Decentralized Society: Finding Web3’s Soul

dNFTs

The d stands for dynamic. These NFTs are not available quite yet but their display will change to mirror the change in something else.

That’s all I can say for now.

MEV

MEV stands for miner extractable value and is the controversial practice where blockchain miners enact what are effectively loopholes to extract profits by reordering the sequence of transactions within a block. This targets unknowing users and the problem is becoming more important in developers’ approach to blockchain and application design. If you’re a techie, this Chainlink article explains it well.

Atomic Swaps

Atomic swaps are swaps with built-in functions that ensure two sides of a trade fulfill a series of predefined conditions before the trade is completed. This often requires the use of a hashed timelock contract (HTLC) which ensures both transactions will be reversed if both parties don’t fulfill their predetermined conditions.

All of this can be done in a decentralized fashion to enable cross-chain trading without an intermediary like a bridge or an exchange needing to be involved.

Flash Loans

Flash loans hit the scene in 2020 when Aave released them with the comments that there is “no real-world analogy” and they are “an advanced concept aimed at developers”. Within a flash loan, unsecured capital is borrowed and repaid back in a single transaction. This strategy can utilize multiple open source smart contracts to attempt to extract arbitrage or other profits from inefficient protocols.

Gaming the System with Non-Standard Accounting

DeFi’s interoperable nature makes it difficult to standardize. Metrics like earnings per share (EPS) exist to a certain extent but they’re often opaquely derived and don’t present an accurate picture of the financial realities taking place – which is the point of all accounting.

One metric you will see everywhere is total value locked (TVL). TVL is a good metric for certain things within certain types of applications but the way it’s measured matters more than anything else. It can easily be gamed to show activity or liquidity that isn’t there. This CoinDesk article breaks down an example of dubious developers implementing double counting mechanisms in their TVL calculation which skewed the data to misrepresent the actual amount of capital involved. It makes you wonder how many protocols are being honest about their TVL calculations when you look at DeFi Llama’s cross-chain TVL aggregation dashboard.

To avoid more misleading accounting practices from taking place, more relevant metrics need to be standardized and used across similar types of applications. Yield farming protocols have different architectures than decentralized fund management protocols and thus need different standardized metrics measuring different things. These different things are currently non-standard because they’re so new and they’re still being developed. As is the case with any new technology, standardization will come with time.

Interoperable, Permissionless Futures

DeFi developers often refer to what they’re doing as building money legos. They’re referring to the interoperable, permissionless capabilities of the financial mechanisms they’re working with. These capabilities have been expanded upon to create new forms of yield generation and means of transferring value, as well as new financial techniques (flash loans and MEV).

As DeFi technology continues to progress, so too with the number of new opportunities for both good and bad actors. It’s imperative to know how these things work behind the scenes before you use them in order to avoid being manipulated or robbed by a bad actor.

It is here where I yet again plagiarize myself and include the tried and true meme that describes all of crypto and self-custody.


We have a new extension