Introduction to CAMPL: Compatible Ampleforth (AMPL) token

Campl
bulldax.finance
Published in
4 min readJul 20, 2020

What is Campl (CAMPL)?

Campl (CAMPL) is an ERC20 token which tracks Ampleforth (AMPL) market cap (MC). Its compatibility with centralized exchanges makes it easier to list, does not require pausing trading during rebases and it provides unique trading and arbitrage opportunities.

Try on: https://campl.io/

Warning: This is not an audited proof-of-concept. Use at your own risk.

We have applied for the smart contract audit, and this section will be updated when the audit is done.

Why CAMPL?

Ampleforth (AMPL) is a digital-asset-protocol for smart commodity-money. AMPL has an elastic supply mechanism: supply expands and contracts in response to demand. Supply changes occur via a smart contract function (rebase) every 24 hours if its price deviates by 5% from a Personal Consumptions Expenditures (PCE) Index, a measure of U.S. inflation. Currently the price target is $1.009 USD.

Target Threshold Band. Given a price target Pt, and price threshold, δ:
1. if the nominal exchange rate between Amples and its target is > Pt + δ, the protocol responds by expanding to coin holders.
2. if the nominal exchange rate between Amples and its target is < Pt − δ, the protocol responds by contracting from coin holders. Source: Ampleforth Whitepaper

The result of this is a change in supply every 24 hours, increasing or decreasing the number of tokens in each holder’s wallet proportionally. It is a non-dilutive asset. “If you own 1% of the network, you’ll always own 1%. No party extracts value and there are no added transaction fees.”

Changing supply once a day provides an opportunity to traders depending on how counterparty traders respond seeking to buy low and sell high.

However, AMPL daily rebases pose technical challenges to list and manage the rebase in centralized exchanges, reducing the trading window and putting centralized exchanges users at a disadvantage to decentralized exchanges users.

Currently only two centralized exchanges have been verified by the Ampleforth Foundation, but trading before, during and after rebase is not available . Bitfinex, for example, pauses AMPL deposits & withdrawals 10 minutes before the start of each rebase window. New trades are paused 1 minute before the start of a rebase. Everything resumes 30 minutes after the start of each rebase window.

Additionally, if users do not have the AMPL funds to cover the open orders after the re-balancing event, then they will see their orders only partially filled if subsequently matched in the market. All open orders are still possible to cancel during the trading pause.

These limitations are solved by CAMPL token. Proposed CAMPL smart contract offers:

  1. Compatibility with centralized exchanges makes it easier to list and does not require to pause trading during rebases;
  2. To track AMPL value expressed proportionally to the AMPL market cap ( AMPL price × supply), so CAMPL’s price makes it easier to track the real AMPL price changes, especially during rebases.

Additionally, the project provides arbitrage opportunities between AMPL and CAMPL, because CAMP is always redeemable for AMPL at formula explained below.

CAMPL token issuance and redemption

CAMPL tokens are issued by the smart contract. Warning: This is not an audited proof-of-concept, so please use at your own risk.

To swap AMPL for CAMPL a user needs to call an ‘approve’ AMPL function call an ‘issue’ CAMPL function.

To retrieve AMPL for CAMPL a user needs to call a ‘reclaim’ function to get AMPL tokens back.

CAMPL issuance amount calculations

The calculation flow for AMPL tokens and CAMPL is proven with the following method.

As mentioned earlier, AMPL token has a unique function of supply and demand changing during the daily rebase periods. In order to issue the correct amount of CAMPL to AMPL token holders, an equation is as follows:

The number of AMPL a holder has and the total AMPL token supply is a fixed value, however, when the supply increases by, for example, 20% then the number of AMPL tokens one holds also increases proportionally.

The actual amount of 1 AMPL token is equal to 10⁹ (as set by the Ampleforth smart contract). However, 1 CAMPL token is equal to 10¹⁸. In order to match these decimals to get as close as we can to 1 AMPL equaling 1 CAMPL, the amount of AMPL tokens held is multiplied by 10²⁶. The total supply is an extremely large number that has the possibility of changing, the denominator cannot be too small which is why 10²⁶ is chosen.

For example, if person A has 1 AMPL token, person A needs to receive a total of 1 CAMPL token in return. However, as mentioned above, 1 AMPL token and 1 CAMPL token hold different actual values. Therefore, 10²⁶ is used to balance this difference.

EX→ Person A has purchased 50 AMPL tokens, what is the amount of CAMPL tokens person A will receive?

Total supply: 139,076,241,299,642,019

The following calculations yields the results of:

Therefore for 50 AMPL tokens, person A will receive 35.9 CAMPL.

50 AMPL = 35.9 CAMPL

Note that the amount of AMPL tokens received back will be different depending on the rebase rates during the holding period, but the user will always maintain the same percentage of the Ampleforth network as if he/she held AMPL in the first place.

Learn more:

CAMPL github: https://github.com/bulldax/campl
CAMPL twitter: https://twitter.com/CamplFoundation

Ampleforth: Whitepaper
Ampleforth website: https://www.ampleforth.org/

--

--

Campl
bulldax.finance

Campl (CAMPL) is an ERC20 token which tracks Ampleforth (AMPL) market cap (MC).