Skip to content

Commit

Permalink
GitBook: [master] 5 pages and 2 assets modified
Browse files Browse the repository at this point in the history
  • Loading branch information
gerrrg authored and gitbook-bot committed Apr 13, 2021
1 parent c3956fd commit 37bfc65
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 25 deletions.
Binary file added .gitbook/assets/1_dsburnzngr8seruz_xjgvg.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .gitbook/assets/asset_manager.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,13 @@ Much like how Bitcoin was developed out of disgust of government money policies,

DeFi promotes the concept of going "[bankless](https://twitter.com/BanklessHQ)" and taking control of your own assets. It lets you remove the middle-men of banks, who make money lending out **your** money. DeFi markets don't require anyone's permission and never close, so you can trade whatever you want, whenever you want.

##
## Why did you write this guide?

DeFi can quickly get technical, but that doesn't mean you need to have PhDs in Mathematics and Distributed Computing to see how powerful it all is. Learning about these tools can open doors to all sorts of new users with different backgrounds, lifestyles, and experiences that can contribute in ways that others didn't see before. If you find this guide useful please share it!

This site and the information on it are and always will be free! If you really really like this guide want to chip in with a tip, here's the tip jar address:

_0x4aa3f02a48436364f3fb3d1e7c8c84afe855a161_

ETH and ERC-20 tokens only, any other assets sent to this address will be lost :\(

2 changes: 1 addition & 1 deletion blockchain-data-i-o.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ Often times, there is a desire to have a on-chain data that different contracts

For just about any website, app, or data stream related to the blockchain, you'll want to look up things like "How many of Token A does wallet 0xabc...0 have?" Since each block is just a series of changes this might not be as easy as you might think to see the "state" of an address.

[The Graph](https://thegraph.com/blog/) is a protocol that makes querying decentralized data possible. This streamlines other crypto projects by allowing developers to query The Graph \(and specifically, their project's sub-graph\) instead of reading the whole blockchain, analyzing the data, and building their own infrastructure for shoving that data into their system.
[The Graph](https://thegraph.com/blog/) is a protocol that makes querying decentralized data simple. This streamlines other crypto projects by allowing developers to query The Graph \(and specifically, their project's sub-graph\) instead of reading the whole blockchain, analyzing the data, and building their own infrastructure for shoving that data into their system.

50 changes: 32 additions & 18 deletions decentralized-exchanges/balancer.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,45 @@

## What is Balancer?

Balancer is a decentralized exchange that allows anyone to trade ERC-20 tokens. While Uniswap uses a one-size-fits-all approach to pool design, Balancer exposes a tremendous deal of flexibility in liquidity pool design. Balancer pools can have up to 8 assets and the trade fee is determined by the pool creator. Trade fees can range from 0.0001% and 10%. Additionally, assets can have unequal weightings, so instead of using 50/50, someone could make a pool that has an 80/20 weighting to reduce [Impermanent Loss](https://explain.eli5defi.info/decentralized-exchanges#what-is-impermanent-loss-il).
Balancer is a decentralized exchange and portfolio management system that allows anyone to trade and invest ERC-20 tokens. While Uniswap uses a one-size-fits-all approach to pool design, Balancer exposes a tremendous deal of flexibility in liquidity pool design.

Balancer's Weighted Pools can have up to 8 assets and trade fees ranging from 0.0001% and 10%. Additionally, assets can have unequal weightings, so instead of using 50/50, someone could make a pool that has an 80/20 weighting to reduce [Impermanent Loss](https://explain.eli5defi.info/decentralized-exchanges#what-is-impermanent-loss-il).

## What's the advantage of multi-asset pools?

With multi-asset pools, a trader can come and trade between any two assets in a pool. This means that with a single pool with 8 assets, the liquidity provider is making 28 \(8 choose 2\) different trading pairs available. This high number of pairs means more potential trades, and more trade fees.
With multi-asset pools, a trader can come and trade between any two assets in a pool. This means that for a single pool with 8 assets, the liquidity provider is making 28 \(8 choose 2\) different trading pairs available. This high number of pairs means more potential trades, and more opportunities to collect trade fees.

## What else can Balancer do?

Balancer has Smart Pools, which have a number of interesting features including surge pricing, liquidity bootstrapping, and more.
Balancer has created a plug-in model that allows for a great deal of customization. The community can create their own systems to contribute to the Balancer Protocol.

### **Asset Managers**

In a typical trading pool, only a small fraction of the liquidity is used to make trades. Asset Managers are external contracts that take unused liquidity and invest it elsewhere. For example, the Aave Asset Manager takes tokens from Balancer pools and lends them on Aave Protocol.

![](../.gitbook/assets/asset_manager.gif)

### **Custom Pool Types**

Balancer Pools can be designed to have any custom logic you might want. For example, in addition to the standard Weighted Pools, Balancer Pools can now also launch with a **StableSwap pricing** equation, which is highly advantageous for trades between assets that have \(nearly\) the same price.

Example use cases:

Balancer has [recently announced](https://medium.com/balancer-protocol/balancer-v2-generalizing-amms-16343c4563ff) their Version 2, which is scheduled to be released in March 2021. New features will include:
* Stablecoins
* ERC20 tokens representing Bitcoin
* Different implementations of synthetic stocks

### **Surge Pricing for Smart Pools**

Dynamic Pool Fees bring surge pricing to Smart Pools. [Developed by Gauntlet](https://medium.com/balancer-protocol/balancer-partners-with-gauntlet-to-make-dynamic-fee-pools-a-reality-97b3fb1760df), these variable fees are designed to maximize returns for liquidity providers by getting the most out of their investments.

### **Liquidity Bootstrapping Pools \(LBPs\)**

LBPs ****create opportunity for new projects to [distribute tokens fairly](https://medium.com/balancer-protocol/building-liquidity-into-token-distribution-a49d4286e0d4) and build liquidity to drive development and growth. LBPs start with intentionally high prices to discourage bots and users from scooping up and hoarding all the tokens right as a pool launches. The price gradually decreases, allowing users to buy in at a price they think is fair. Examples of some projects that built liquidity with LBPs include Perpetual Protocol, Radicle, and Illuvium.

![Linear Example of Pool Weights for an LBP](../.gitbook/assets/1_dsburnzngr8seruz_xjgvg.jpg)

* Even more customization in trading pools
* Including Stablecoin-focused price formulas
* Reduced gas usage
* Protocol Vault for all pool assets
* One contract holds all assets instead of each pool holding its respective assets
* Two types of Price Oracles
* Resilient
* Low gas cost
* Asset Managers

See more details in the Medium post linked above!

## How are prices determined?

Expand All @@ -34,9 +50,9 @@ $$
\prod{{x_i}^{w_i}}=k
$$

Instead of the "xy=k" of the Uniswap formula, Balancer's formula accounts for the custom weight by raising each "x" its weight's exponent.
Instead of the "xy=k" of the Uniswap formula, Balancer's formula accounts for the custom weight by raising each "x" by its weight's exponent.

While spot price \(_SP_\) in a Uniswap-style pool can be calculated with:
While spot price \(_SP_\) in a two asset Uniswap-style pool can be calculated with:

$$
SP = \frac{B_i}{B_o}
Expand All @@ -48,5 +64,3 @@ $$
SP = \frac{(B_i/W_i)}{(B_o/W_o)}
$$



4 changes: 0 additions & 4 deletions decentralized-lending/aave.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
---
description: '"I ain''t afraid of no ghosts" -Roy Parker Jr.'
---

# Aave

## What is Aave?
Expand Down
2 changes: 1 addition & 1 deletion stable-coins/crypto-backed.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Decentralize it

These are similar to fiat backed tokens, but there's a bit more work to have the token target a dollar. Using surplus collateral of crypto assets, protocols can issue stablecoins.
These are similar to fiat backed tokens, but there's a bit more work to have the token target a dollar. These protocols are over-collateralized with a healthy safety factor for protection against price swings. Protocols can create economic incentives to increase or decrease supply. If the collateral \(times a safety factor\) becomes worth less than the stablecoin, part of the collateral is sold to make up for the debt.

This explanation is intentionally high-level. Read [this article](https://medium.com/mycrypto/what-is-dai-and-how-does-it-work-742d09ba25d6#:~:text=The%20TRFM%20is%20an%20automatic,Price%20during%20a%20market%20swing.) if you want to dig deeper.

Expand Down

0 comments on commit 37bfc65

Please sign in to comment.