Calculation Issues During Phase 2

At æternity we want to be honest and transparent with our community. That’s why we would like to describe the issues we faced during Phase 2 in detail.

We’re working to create a fair solution for everyone. That’s why we haven’t frozen a rate of BTC/ETH for the Phase 2. Instead, we’re going to calculate amounts using accurate prices based on a timestamp of each transaction.

For this reason, at the beginning of Phase 2 we used a web API of CryptoCompare.com as a provider of historical currency rates. We took rates every 15 minutes. Here is an example of a request that we used:

https://min-api.cryptocompare.com/data/pricehistorical?fsym=ETH&tsyms=BTC,CHF&ts=1496019600

Past approach

How did we calculate AE tokens for BTC contributions?

For ETH contributions we have a fixed conversion rule to AE tokens. But for BTC contributions we decided to go this way:

  • Take ETH/BTC rate from CryptoCompare.com every 15 minutes, based on the block time of BTC transaction.
  • Convert BTC amount to ETH using the rate.
  • Apply ETH/AE tokens rules.

How did we calculate CHF total?

For the calculation of the CHF total of Phase 2 we used a similar approach:

  • Take ETH/BTC and ETH/CHF rates from CryptoCompare.com each 15 minutes, based on the block time of ETH and BTC transactions.
  • For ETH transactions: multiply ETH amount by CHF/ETH rate.
  • For BTC transactions: multiply ETH amount by BTC/ETH rate, then multiply the result by CHF/ETH rate.
  • Calculate the sum of CHF amounts of all Phase 2 transactions.

Why do I say in past tense? Because we faced several issues with historical rates provided by CryptoCompare.

Issues

We want to apologize deeply to creating any confusion with the front end. Please see that this was not intentional.

Issue #1: More AE tokens for BTC contributions in the first day

We accidentally used BTC/ETH rate of Phase 1 during the first day of Phase 2. In April the BTC/ETH rate was 2 times smaller than now, so once we fixed this issue, BTC contributors noticed that the amount of tokens decreased. This is because we recalculated your AE tokens with actual BTC/ETH rate.

Issue #2: Floating amount of AE tokens for BTC contributions

On the second day of Phase 2 we noticed that amount of AE tokens for BTC contributions changed a little. Why? Because when we selected CryptoCompare as a provider of historical currency rates, we didn’t notice on their web API documentation, that for previous days (but not the current day) their API returns the price at the end of the day GMT based on the requested TS.

This means that during the current day we calculated your AE tokens using the accurate rate, which is based on the time of transaction. But on second day we calculated using the rate at the end of the day that the contribution was made. This was wrong.

Issue #3: Frozen CHF total on June 3

During June 3 there was a moment when total CHF was not changing while amounts of ETH and BTC contributions increased. Why? As mentioned earlier, we used CryptoCompare for rates and at some moment this service started to return 0.0 rate for a pair ETH/CHF.

Current approach

After having the issues with CryptoCompare that mentioned above, we made a decision to use the rates from Poloniex as this is the most popular crypto exchange and it makes an impact on the price of cryptocurrencies. Although Poloniex has a good API, it doesn’t return an average price for each 15 minutes interval, and we needed this.

This is why we created our own solution that takes all historical trades from Poloniex in a date range of Phase 2 and calculates the average rates of BTC/ETH and USDT/ETH every 15 minutes.

How do we calculate AE tokens for BTC contributions now?

To calculate AE tokens of BTC contribution we use the following formula:

AE_tokens = (BTC_amount * ETH/BTC) * AE/ETH

Where AE/ETH is equal to the token rules of Phase 2.

How do we calculate CHF total now?

As Poloniex uses USDT but not CHF, we assume that USDT/CHF is around 1. You can check it on your own: the price is floating between 0.98 to 1.03.

The formula of total CHF of Phase 2:

Total_CHF = (Total_ETH + Total_BTC * ETH/BTC) * USDT/ETH

Where we take the ETH/BTC and USDT/ETH rates from Poloniex and calculate an average each 15 mins.

Why you should not worry about your AE tokens

Blockchain is our friend. As all your contributions are recorded on a blockchain in either Ethereum or Bitcoin, you will get the right amount of AE tokens. Everything will be recalculated one more time using the right currency rate at the time of contribution.


Interested in æternity? Get in touch:

GitHub | Reddit | Telegram | Twitter | Facebook | Mail


Leave a Reply

Your email address will not be published. Required fields are marked *