# About the Ampleforth Protocol

The Ampleforth protocol is a set of instructions on the Ethereum blockchain that produces a decentralized [unit of account](../glossary#unit-of-account) called AMPL. The AMPL token is the primary building block of the Ampleforth Elastic Finance Ecosystem. It is used for lending & borrowing, for the creation of [derivatives](../glossary#derivatives), and as collateral for a decentralized [stablecoin](https://docs.ampleforth.org/learn/glossary#stablecoin).

### AMPL and FORTH

The protocol consists of two primary tokens, AMPL and FORTH.

* **`AMPL`:**  The [unit of account](../glossary#unit-of-account) ERC-20 token. AMPL's price targets the CPI adjusted 2019 USD, but the number of AMPL tokens in user wallets automatically increases or decreases based on demand. AMPL will deviate from its target when market demand indicates there is too much or too little supply, but the price per AMPL will always eventually return to its long-run target.&#x20;
* **`FORTH`:** The Ampleforth ecosystem's [governance token](about-forth-governance). FORTH is an ERC-20 token used to govern protocol parameter changes, direct liquidity mining emissions, and direct the use of DAO treasury assets dedicated to stimulating innovations in the elastic finance and broader DeFi space. Holders vote using their FORTH tokens. &#x20;

## How the Ampleforth Protocol Works

The Ampleforth Protocol targets the CPI adjusted 2019 US dollar and automatically expands or contracts the quantity of tokens in user wallets based on price. Think of AMPL as similar to Bitcoin, except the number of AMPL tokens in your wallet increases when there's more demand and decreases when there's less demand.&#x20;

### Elastic Supply Policy

* **Expansion**: When the `price_exchange_rate` of AMPL > `1 2019 USD` the market is indicating there is more demand than supply. In response the Ampleforth protocol automatically and proportionally increases the quantity of tokens in user wallets, gradually bringing price down to its target.&#x20;
* **Contraction**: When the `price_exchange_rate` of AMPL is < `1 2019 USD` the market is indicating there is more supply than demand. In response the Ampleforth protocol automatically and proportionally decreases the quantity of tokens in user wallets, gradually bringing price up to its target.&#x20;

AMPL will deviate from its target when market demand indicates there is too much or too little supply, but the price per AMPL will always eventually return to the CPI adjusted 2019 dollar. Holders of the AMPL token experience supply volatility, but contracts denominated using AMPL remain stable in the long-run.&#x20;

Because the Ampleforth protocol transfers the volatility of demand rather than attempting eliminate it altogether, AMPL cannot break by natural market forces and does not require any collateral, treasury, market-maker, or buyer-of-last-resort to return to its long-run target.

For details on how supply changes are calculated and how often the protocol updates supply (or rebases), see [Additional Protocol Details](#additional-protocol-details).&#x20;

## Applications Now and Looking Forward

Price volatility prevents modern day cryptocurrencies from functioning as units of account. This function of money is important because it enables the denomination of predictable contracts that can serve as the basis of more complex banking systems.&#x20;

To this end many attempts have been made to produce [stablecoins](https://docs.ampleforth.org/learn/glossary#stablecoin) which can serve as both [unit of account](../glossary#unit-of-account) and refuge from volatility. However, systems that have attempted to remove volatility altogether have thus far materialized as solutions that are either highly censorable or highly unreliable.&#x20;

![Table 1 - Stablecoin Solution Space](https://1790235423-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MkNMc1gQVnWl-KJCxdj%2Fuploads%2Fh25qiS867JWEPmXjDmS9%2Ftable_1_colored.jpg?alt=media\&token=03c116d4-e908-44b8-96b5-9a32d176c3d5)

It is our view that fundamental building blocks should be made as robust as possible. For this reason, the Ampleforth ecosystem has elected to first separate this goal of creating a durable [unit of account](../glossary#unit-of-account) from broader attempts to [store near-term value](../glossary#store-of-value), and then rebuild the financial stack with more modular, durable, blocks.

![Elastic Finance Stack — building from the bottom up](https://1790235423-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MkNMc1gQVnWl-KJCxdj%2Fuploads%2FNas8Dg3f5jGvxD1wImlE%2Ftable_2_arrows_progressive.jpg?alt=media\&token=5d3e386a-3388-4e5e-96c6-3f49226301fe)

As a building block AMPL enables the denomination of stable on-chain contracts without any reliance on centralized custodians or buyers of last resort. This capability propagates into a number of use cases including on-chain lending, on-chain borrowing, the creation of on-chain [derivatives](https://docs.ampleforth.org/learn/glossary#derivatives), and the creation of collateral for a decentralized [stablecoin](https://docs.ampleforth.org/learn/glossary#stablecoin).

### Decentralized Lending

The simplest AMPL use case is decentralized debt denomination. Typically when a person borrows money they intend to put that money to work immediately and then pay it back later with interest. However, when a loan contract is denominated with a floating price currency like ETH, the borrower has to factor in the price volatility of ETH. To illustrate we can follow a simple example:&#x20;

* **ETH Denominated Loan Example** - Imagine Alice borrows `1 ETH`, valued at `$1000/ETH`, to be paid back at a later date. If Alice sells the ETH to put $1000 to work and the price of ETH increases to `$3000/ETH`,  she will need to spend $3000 to acquire the ETH in order to pay back her loan.&#x20;

Because loans denominated in price-volatile currencies are so risky, the majority of borrowing activity on decentralized lending platforms is unfortunately denominated with centralized [stablecoins](https://docs.ampleforth.org/learn/glossary#stablecoin). AMPL eliminates this dependency and enables sustainable lending and borrowing on decentralized lending platforms.&#x20;

* **AMPL Denominated Loan Example** - Imagine Bob borrows `1000 AMPL` to be paid back at a later date. If Bob sells the AMPL to put $1000 to work, he can be reasonably certain that the cost of re-purchasing the AMPL to pay back her loan will be reasonably stable in the long-run due to AMPL's mean-reverting price, even if the AMPL network profoundly increases or decreases in size.&#x20;

Although AMPL holders experience the same kind of fat-tailed stock volatility expected of floating-price tokens like ETH, contracts denominated in AMPL remain long-run stable, as is the case with Bob's loan example above. AMPL is currently available as a lend and borrow asset on AAVE.&#x20;

### Decentralized Derivatives

Derivatives are a special type of financial contract whose value depends on an underlying asset. Such contracts require a unit of account for denomination and AMPL similarly enables the creation of on-chain [derivatives](https://docs.ampleforth.org/learn/glossary#derivatives). To help illustrate this, let's explore a simple example: ‌&#x20;

* **AMPL Derivative Example** — Imagine Bob wants to split the stock-volatility of AMPL into two derivative tranches, a senior (low-risk) tranche and a junior (high-risk) tranche. Bob can author a simple smart contract that accepts a redeemable AMPL deposit, and attributes 1/10 of all future supply changes to the senior tranche token while attributing 9/10 of all future supply changes to the junior tranche token. At the time of maturity senior tranches are first in line to redeem followed by junior tranches second.

Bob will have created a senior [derivative](https://docs.ampleforth.org/learn/glossary#derivatives) token that is considerably less volatile than the underlying AMPL and a junior [derivative](https://docs.ampleforth.org/learn/glossary#derivatives) token that is considerably more volatile, without any added oracle risk. Please see [ButtonWood](https://button.foundation/) to follow on-going progress on this.

### Decentralized Stablecoin

Following from the concept of on-chain [derivatives](https://docs.ampleforth.org/learn/glossary#derivatives) above, correctly configured safe-asset (senior) tranches can be used as transparent and robust collateral by the issuer of a crypto-collateralized [stablecoin](https://docs.ampleforth.org/learn/glossary#stablecoin). ‌&#x20;

Because the tranche ratios of the respective [derivatives](https://docs.ampleforth.org/learn/glossary#derivatives) are pre-defined and redeemable, the volatility tolerance of a senior tranche token can be clearly defined (ie: it can be initialized such that the safe-asset [derivative](https://docs.ampleforth.org/learn/glossary#derivatives) can tolerate an X% fall in demand). This sort of redeemable on-chain [derivative](https://docs.ampleforth.org/learn/glossary#derivatives) does not require liquidation markets and introduces no additional oracle risk. ‌&#x20;

A breakthrough in safe-asset collateral would allow crypto-collateralized [stablecoins](https://docs.ampleforth.org/learn/glossary#stablecoin) to reduce their reliance on tokens backed by traditional assets (like USDC) as collateral, making them more decentralized.&#x20;

## Oracle Risks

To execute its automatic supply policy, the Ampleforth protocol accepts a volume-weighted-average price exchange-rate through a network of Oracles. Although attacks on this Oracle network can temporarily corrupt the inputs to Ampleforth's supply policy, in theory, great care has been taken to negate the impact of Oracle Attacks.  Most importantly, because AMPL is non-custodial and the policy is proportional, no funds can be stolen or redistributed by an Oracle Attack. To help illustrate this, let's walk through a simple example.

### Stable Transfer Application Example

Let's imagine a simple application that allows its users to send a dollar denominated amount of money from one wallet to another, we’ll call it Stable Transfer.

* When Alice wants to transfer `$100` to Bob, the Stable Transfer contract queries an oracle for the price-exchange rate of ETH to US dollars, and then it transfers an automatically calculated quantity of ETH to Bob.&#x20;

Since each transfer queries an oracle to calculate an ETH amount before transferring to its receivers, oracle requests are `O(n)` with the number of transfers. Each of these oracle requests presents an exploit opportunity and incurs an added cost. Finally, if an attacker exploits the exchange-rate oracle, or if there’s a bug in the oracle, senders can transfer the wrong amount of money resulting in a loss of funds.&#x20;

### AMPL Example

Alternatively, the AMPL equivalent of the Stable Transfer application, isn’t really an application at all. Alice would simply transfer 100 AMPL to Bob and there would be no oracle query at the time of transfer. In the case of AMPL, rebases occur once daily and oracle requests are `O(1)` per day. More importantly, because the protocol’s supply policy is proportional and non-dilutive, oracle attacks cannot result in the theft or redistribution of assets.&#x20;

## Governance

Governance over the Ampleforth protocol and ecosystem is controlled by the FORTH token. Please see the [Forth Governance](about-forth-governance) entry for more details.&#x20;

## Additional Protocol Details

* Supply adjustments, termed "rebases", are applied by updating a global scalar coefficient of expansion every day at `2AM UTC` . This adjustment is applied universally to all addresses and doesn't require any transaction between peers.&#x20;
* Rebases only adjust supply if the price of AMPL deviates from its target by > the `deviation_threshold`. This threshold is set by an adjustable hyper-parameter and is currently set at 5%. To see the network's current volume-weight-average (VWAP) price, visit the [dashboard](https://www.ampleforth.org/dashboard/).&#x20;
* Rebases are smoothed by a [`sigmoid curve`](https://forum.ampleforth.org/t/rebase-curve-upgrade-proposal/327) that caps supply changes at its asymptotes. It has shaping parameters that determine: lower asymptote, upper asymptote, and the steepness of the curve (ie: growth rate). These parameters are currently set to -0.1, 0.1, and 3 respectively
* The Ampleforth protocol's supply changes are proportional and non-dilutive. If a user owns `Y%` of the network before a rebase, the user will always own `Y%` of the network unless the user buys or sells more AMPL.&#x20;

