Situation
An Algorithmic Currency for DeFi That Translates Price Volatility to Supply Volatility
Cryptocurrencies are completely new monetary assets that provide users with technologically-enforced guarantees around maintaining fixed supply. However, cryptocurrencies are also notoriously volatile assets, which render them difficult to rely on as stable value assets for payments, collateral, and storing wealth. While stablecoins have emerged as popular protocols for reducing volatility around blockchain-based assets, many stablecoins still require trust in an off-chain custodian or rely on lenders to take on new debt in order to re-establish the peg. Ampleforth has pioneered a different model.
In 2019, Ampleforth launched on the Ethereum mainnet with the goal of creating an algorithmic currency called AMPL that denominates stable contracts through dynamic adjustments to its supply called “rebases.” These rebases are designed to keep AMPL at its target price of one inflation-adjusted US dollar, referred to as the Consumer Price Index (CPI). This elastic supply model removes the need for traditional banks as trusted custodians or the collateralization of on-chain assets, establishing an independent financial ecosystem that mitigates liquidity crises and reduces systemic risk across the larger DeFi market.
However, in order for Ampleforth to achieve its goal of being a fully decentralized rebasing currency, it needed to decentralize its oracle, the key mechanism that determines the magnitude of daily rebases. The oracle could not be controlled by the Ampleforth team as that would introduce a centralized point of failure to the protocol. Ampleforth required a proven decentralized oracle network that could be trusted to automate secure and reliable on-chain updates for the two key data feeds required to trigger daily rebases: the current AMPL/USD price and CPI.
Challenge
Decentralizing the Oracles That Calculate Daily Rebases
- Obtain on-chain access to the volume-adjusted market price of AMPL and the latest CPI in a decentralized and automated manner
- Ensure both data feeds represent the most up-to-date market conditions and are immune to downtime or tampering by any external entity
- Allow AMPL users to independently verify the performance of the oracle mechanism as being reliable and accurate
AMPL is traded across a variety of centralized and decentralized exchanges and the Consumer Price Index is updated monthly off-chain by the U.S. Bureau of Economic Analysis. Both the volume-adjusted AMPL/USD price and CPI require an oracle mechanism to obtain the external data because neither is generated natively on the blockchain. However, blockchains have no built-in mechanism for fetching external data. They require a blockchain oracle to retrieve external data feeds.
Initially, the Ampleforth team operated their own oracle mechanism, which gave them sole control over the daily rebases to the AMPL token supply. However, the Ampleforth team’s ultimate goal was to decentralize the oracle mechanism and make the system more resilient to potential downtime or manipulation.
Decentralizing the oracle mechanism required access to a decentralized network of secure oracle node operators that source high-quality data with broad market coverage across all trading environments. The oracle network would then need to aggregate the data to generate a single, validated data update to trigger the next rebase. Additionally, Ampleforth would need on-chain proof that the data delivered by the oracles and triggering the rebases is accurate and timely. For the Ampleforth team to build a robust oracle infrastructure that achieves these layers of decentralization and data aggregation, the development process would have consumed significant costs and engineering hours and would ultimately not meet the end-to-end security guarantees of a time-tested solution like.
Solution
Decentralized Oracle Networks
Is a decentralized oracle network that enables smart contracts to obtain external data in a secure and reliable manner. Provides highly available and tamper-proof data feeds by using decentralized networks of secure node operators to ensure no single oracle node or data feed is the sole source or deliverer of on-chain information used to trigger the execution of a smart contract.
Ampleforth uses two decentralized oracle networks: a Market Oracle for the current Volume Weighted Average Price (VWAP) of AMPL/USD and a Consumer Price Index (CPI) Oracle to establish the target price of one inflation-adjusted US dollar. The Market Oracle provides an on-chain update every day just before the daily rebase in the supply, while the CPI Oracle updates once a month after the new monthly CPI data is released by the U.S. Bureau of Economic Analysis.
The Ampleforth protocol compares the Market Oracle to the CPI Oracle to determine the magnitude of the daily rebase. The rebase results in every AMPL holder experiencing a proportional increase or decrease in the AMPL tokens held in their wallet. Thus, rebases are non-dilutive, meaning users still maintain the same percentage of the supply they had before. By adjusting the supply, profit-seeking entities are incentivized to consistently arbitrage the difference between the current AMPL/USD price and its CPI target, which serves to stabilize the value of the AMPL token over time.
Provided a secure and reliable decentralized oracle solution for Ampleforth by using numerous independent, security reviewed oracle node operators run by professional DevOps to each retrieve off-chain data. For Price Feeds specifically, each node operator sources price data from at least three premium off-chain data aggregators. Not only does each individual data source generate a volume weighted average price that reflects market coverage across all trading environments, but each node response also represents a median of multiple data sources.
Through high-quality data sourcing and decentralized data delivery, Ampleforth receives trusted price feeds in a highly available and tamper-resistant manner. The data undergoes three levels of aggregation to ensure the utmost accuracy and security: aggregated data sources, aggregated individual node responses, and an aggregated data point delivered on-chain by the oracle network to trigger the rebases.
Without secure oracle infrastructure and external adapter technology, Ampleforth would not be able to obtain high-quality data feeds from premium data aggregators like BraveNewCoin, Kaiko, and CoinMarketCap, nor would it be able to pull CPI data directly from the U.S. Bureau of Economic Analysis. Moreover, the Network already contains a large collection of professional node operators and is trusted by leading financial data providers, expediting Ampleforth’s ability to connect with high-quality data providers that satisfy their unique data feed requirements.