Timecoin’s Oracle

Timecoin
3 min readSep 20, 2022

The idea behind Timecoin is that it is pegged to time. We have already touched on the enormous advantages that result from this in the previous article. Especially that time itself is decentralized. Now we explain at what time exactly it is pegged.

For the oracle to base the price on, we use something you’ve probably seen before: the Unix timestamp. The Unix timestamp is used almost everywhere. For example, if you make a transaction on a blockchain, the Unix timestamp will also be there.

The advantage is that it has been used for over 50 years and has established itself in all computer systems. Therefore, it is easy to find out the present, past and future timestamp. There are many websites online that can display the current timestamp and calculate others.

This solves the problem of an oracle. Normally you always need an oracle that specifies the price. However, this also entails risks, since everyone depends on it. This is not the case for us, since the timestamp is clearly defined on every computer in the world. It cannot be manipulated and is therefore the most secure oracle we have today.

The Unix timestamp returns the number of seconds that have elapsed since 01/01/1970. If we were to take the number unchanged as the price, we would have a very high number. Since this isn’t very practical for everyday use, we need to make the number smaller.

There are two approaches that we could take:
1. We take the elapsed days instead of the elapsed seconds.
2. We take the elapsed seconds and divide it by 100,000.

The first approach would require us to divide the elapsed seconds by 86400 (60 seconds * 60 minutes * 24 hours). This would then return the days elapsed. However, we opted for the second option.

The reason for this is that every normal person should be able to see at a glance whether the price and therefore the oracle is correct, without having to calculate anything.

Example Calculation

The current Unix timestamp is: 1663602450

If we were to go with the first approach, then the price now amounts to 1663602450 / 86400 = $19,254.6579861111

And if we take the second approach, the price would be $16,636.02450

See what we mean? In the second example, you can see at a glance whether the price is right or not. In the first example, this is much more difficult. In addition, long decimal places are created. Which leads to even more complexity than it needs to be.

But why do we divide by 100,000 and not something else?

The reason is that this number is closest to 86400. That means, very roughly speaking, you have a dollar a day increase. Actually, it’s every 27.78 hours (100000 / 86400 * 24).

The other reason is the decimal places. We still have enough space to make even more precise amounts in the millisecond range. This could be beneficial for automated and institutional traders who execute multiple trades in a second.

We have already built a small website where you can see the current price and compare it with the timestamp. It can be reached here: https://time-labs.github.io/timecoin/

The source code is completely open source and can be viewed at any time: https://github.com/time-labs/timecoin

We would be very happy about any feedback!

In addition, we are already starting the private presale round. This allows you to secure a part now while it is being developed. And you can already benefit from the price increase. Just get in touch with us.

Follow us for more updates: https://linktr.ee/timecoin

--

--