Amr Ali Profile picture
May 22 27 tweets 7 min read
#Week_2: #DeFi Day 4: Decentralized Finance: On Blockchain- and Smart Contract-Based Financial Markets by @chainomics, will break it into 2 parts

A very good read coming from an academic professor!

This article highlights opportunities and potential risks of the DeFi ecosystem.
2- DeFi uses smart contracts on top of blockchains to create open protocols that replicate existing financial services in a permissionless, interoperable, and transparent way,
Agreements are enforced by code (no middleman) transactions are executed in a secure and verifiable way.
3- So the adv here: unprecedented transparency, equal access rights, and little need for custodians, central clearing houses, or escrow services, as most of these roles can be assumed by "smart contracts."

So The backbone of all DeFi protocols and applications is smart contracts
4- They are executed by a large set of validators, so the network is designed so that each participant can be involved in and verify the correct execution of any operation.
Which makes them highly transparent and minimize the risk of manipulation and arbitrary intervention.
5- Look in the real world: the user is not in control of the execution environment. Either one or both could be manipulated. As a result, the user has to trust the application service provider. Smart contracts mitigate both problems and ensure that an application runs as expected
6- Additionally, they can store crypto assets and assume the role of a custodian, with entirely customizable criteria for how, when, and to whom these assets can be released. This allows for a large variety of novel applications and flourishing ecosystems.
plus composability!
7- DeFi numbers grew rapidly in the last 2 years regards: market cap, available applications, and development activity. Look at the figure for ETH DeFi until 2021, there is much potential to growth and sparked interest among policymakers, researchers, and financial institutions. Image
8- *DeFi BUILDING BLOCKS*

DeFi uses a multi-layered architecture, Every layer has a purpose. The layers build on each other and create an open and highly composable infrastructure.
as shown in the figure
1:Settlement layer consists of the blockchain and its native protocol asset Image
9- The blockchain can be seen as the foundation for trustless execution.
2: The asset layer consists of all assets that are issued on top of the settlement layer(native+ any issued one on this blockchain)
3:The protocol layer provides standards for specific use cases -
10- Such as decentralized exchanges, debt markets, derivatives, and more (DeFi application)
4: The application layer creates user-oriented applications that connect to individual protocols
5: Aggregation layer is an extension of the application layer comparing to get best rates
11- Let us take a closer look at tokenization and the protocol layer, investigating different Defi Services after, so we can have the foundation needed for analysis of the potential and risks of DeFi

*Asset Tokenization
The process of adding new assets to a blockchain-
12- is called tokenization, referred to as Tokens.
The idea is to make assets more accessible and transactions more efficient (transferred easily and within seconds from and to anyone in the world).

As of Jan 2021, there are over 350,000 ERC-20 token contracts deployed on Eth Image
13- One of the main concerns with tokenized assets is issuer risk,
when someone introduces tokens with a promise, for example, interest payments, dividends, or the delivery of a service, the corresponding token's value will depend on this claim's credibility.
14- If an issuer is unwilling or unable to deliver, the token may become worthless or trade at a significant discount. This logic also applies to stablecoins (e.g what happened with UST lately)
Generally, there are three backing models for promise-based tokens: --
15- off-chain collateral, on-chain collateral, and no collateral.
1*Off-chain collateral means that the underlying assets are stored with an escrow service, for example a commercial bank (eg: usdc)
Adv: minimizing the exchange risk
Disadv: external dependencies, regular audits=
16- This process is costly and, in many cases, not entirely transparent for the token holders.

2*On-chain collateral means that the assets are locked on the blockchain= meaning several advantages: Being highly transparent, and claims can be secured by smart contracts =
17- allowing executions in a semi-automatic way,
the disadvantage here is that this collateral is usually held in a native protocol asset (Like DAI and ETH) = price fluctuations

3*No-collateral: The risk is at its highest. In this case, the promise is entirely trust-based.
18- *Decentralized Exchange Protocols

in most cases, crypto asset trades are conducted through centralized exchanges. Centralized exchanges are relatively efficient, but they have one severe problem,
You have to trust the exchange, they will hold your assets= potential hacks-
19- Dishonest or unprofessional exchange operators may confiscate or lose assets.

Decentralized exchange protocols try to mitigate these issues by removing the trust need. Users no longer must deposit their funds with a centralized exchange, it happens through smart contracts-
20- So the code runs it again.

There is various types of decentralized exchange protocols as bellow in the image,

*Decentralized Order Book Exchanges
here, order book can be implemented in a variety of ways, They all use smart contracts for transaction settlement- Image
21- But they differ significantly in how the order books are hosted, on-chain and off-chain order books.

On-chain order books have the advantage of being entirely decentralized. Every order is stored within the smart contract. So there is no need for third-party hosts
22- The disadvantage: that every action requires a blockchain transaction. Therefore, it is a costly and slow process,
For this reason, many decentralized exchange protocols rely on off-chain order books and only use the blockchain as a settlement layer.
Disadv: centralization
23- *Constant Function Market Maker(CFMM)
It is a smart contract-liquidity pool that holds (at least) two crypto assets in reserve and allows anyone to deposit tokens of one type and thereby to withdraw tokens of the other type.
24- To determine the exchange rate, It uses variations of the constant product model, where the relative price is a function of the smart contract's token reserve ratio.
the constant product model can be expressed as xy= k, where x and y are the token reserves and k is a constant Image
25- A liquidity pool using this model cannot be depleted, as tokens will get more expensive with lower reserves.
The implicit bid/ask spread of the constant product model (plus a small trading fee) may lead to the accumulation of additional funds. Anyone who provides liquidity-
26- to the pool receives pool share tokens that allow them to participate in this accumulation and to redeem these tokens for their share of a potentially growing liquidity pool. Liquidity provision results in a growing k and is visualized in Figure above
the next part will be tomorrow, link to the full article which worth reading for sure: research.stlouisfed.org/publications/r… Thanks to professor: @chainomics and his contributions!

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Amr Ali

Amr Ali Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @amrali0fx

May 26
#Week_3: #P2E, Day 2: Level 2: Game Monetization, The Promise of Play-And-Earn by @0xRyze

A glance into Game Monetization & how to keep games running

@AxieInfinity has been making headlines in the news for variety of reasons: its token’s price action, how it creates work- Image
2- For people globally and its incredible profit surge, surpassing the revenue of big projects (84.9 million USD in funds for its treasury! as of jul 2021)

Games as Products, server costs, the cost of hiring engineers and developers to build them, etc.
3- Keeping a (Game’s) Engine Running;

Game developers have a choice of how to monetize and fund their games. They must find ways to (1) fund initial development, (2) make revenue from the game that outstrips expenses.

Breaking down different incentives to monetize it;
Read 25 tweets
May 24
#Week_3: #P2E, Day 1: Crypto Gaming, a thought piece
by @QuirkyQwerty_

"How to think about crypto games"

One of the greatest takeaways for crypto natives from the bull market of 2021 is that the next million crypto users will be onboarded through “consumerism”, not DeFi,
2- Meaning the stuff which are consumed, used regularly, that the average person in the street can understand it; unlike finance.

So there will be a generational opportunity to participate in this paradigm shift, for those who pay close attention.

Here are some thoughts
3- The state of crypto gaming | What does crypto gaming look like today?

*the player point of view (POV);
-P2E for now is just yield farming with extra steps.
-Gaming Guilds resemble factories hiring laborers to perform small tasks

*Game POV;
-Asset A is used to farm Token X
Read 13 tweets
May 23
#Week_2: #DeFi Day 5: Decentralized Finance: On Blockchain- and Smart Contract-Based Financial Markets by @chainomics part 2

*Smart Contract-Based Reserve Aggregation.
Here: The smart contract will compare prices from all liquidity providers, accept the best offer -
2- on behalf of the user, and execute the trade. It acts as a gateway between users and liquidity providers, ensuring best execution and atomic settlement.

*Peer-to-Peer Protocols: It is an alternative to exchanges or liquidity pools, also called over-the-counter (OTC) protocol
3- They mostly rely on a two-step approach, where participants can query the network for counterparties who would like to trade pair of crypto and then negotiate the exchange rate bilaterally. Once the two parties agree on a price, Trade is executed on-chain via a smart contract
Read 25 tweets
May 20
#Week_2: #DeFi, Day 3: A Beginner’s Guide to (DeFi) by @sid_coelho

Actually it has a lot in common with yesterday's article, so i will try to focus on the new angels.

Crypto promises to make money and payments universally accessible, no matter where they are in the world.
2-DeFi takes that promise a step further. Imagine a global, open alternative to every financial service you use today -savings, loans, trading, insurance and more- accessible to anyone in the world with a smartphone and internet connection.
This is now possible by smart contracts
3- Smart contracts are programs running on the blockchain that can execute automatically when certain conditions are met. Not only that, it has the composability function: meaning we can build on top of it, more sophisticated products, which is called: decentralized apps or dapps
Read 16 tweets
May 17
#Week_2: #DeFi, Day 1: Decentralized Finance - the High Level Basics - by DeFi Education

In a sentence, banks can be replaced by software code

Long-term the majority of transactions will be done with smart contracts. Similar to how e-mail displaced the majority of snail mail,
2- Smart contracts will replace middlemen.

Before Defi, Bitcoin and other major crypto currencies like Ethereum were *unproductive assets* in your portfolio,

With smart contracts, you can now take loans against it *or* loan it out, and some other Utilities.
3- Collateralized Loan: Imagine a world where you could lend out money, knowing that there was collateral staked (avoid total loss),

On the borrower side, imagine a world where you can take out a loan for stable coins without interacting with a bank. This is what exists today.
Read 15 tweets
May 16
#Week_1: #Tokenomics Day 5: On the meme of market caps & unlocks by @cobie

terms repeated in the previous summaries: Mcap: price multiplied by the amount of tokens that are currently in circulation.

FDV: price multiplied by the total amount of tokens that will ever exist
2- Smth interesting here, we can consider Market Cap as a measure of public $ buying= demand, while FDV is a measure of supply.

As demand increases for unlocked coins= market cap UP, FDV increases proportionally, even though demand for the locked ones didn't necessarily increase
3- let's introduce a new term: Bullish unlock?
if unlocks increase supply but not demand, how does a bullish unlock happens?

locked tokens can have an active market of their own, ppl buy or sell locked coins with a discount to the market price, Consider it OTC for an allocation,
Read 19 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


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

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

Become Premium

Don't want to be a Premium member but still want to support us?

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

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(