AlphaDex Explained in Images

Kitten Finance
4 min readNov 4, 2020

The idea of AlphaDex ( https://www.alphadex.org/ ) is simple:

Be a BULL if you think the price will go up.

Be a BEAR if you think the price will go down.

There are more details in AlphaDex, including “TWAP” and “x+2 vs x+1” stuff. They are to make sure the process is fair and prevent hackers. You can safely ignore them.

But if you are interested in the details, then this explanation is for you.

In AlphaDex, everything comes in rounds. In this example, one round = 10 minutes.

In AlphaDex, traders speculate on TWAP (time-weighted average price).

Because instant prices can be manipulated by flash loan attacks (price spikes) even for highly liquid pairs. This happened multiple times and tens of millions of dollars were lost.

If you stake in round X, you are speculating on [TWAP of round X+2] vs [TWAP of round X+1].

This is the same as speculating on future price movements. We’ll explain the reason in later images.

In this case, BULLs in round X win, because [TWAP of round X+2] > [TWAP of round X+1].

You may ask: why don’t we use [TWAP of round X+1] vs [TWAP of round X]?

Here we can see the reason. The price goes up, yet TWAP goes down: [TWAP of round X+1] < [TWAP of round X].

This will certainly be confusing for traders.

However, if we look at [TWAP of round X+2] vs [TWAP of round X+1], then [TWAP of round X+2] starts higher than [TWAP of round X+1].

So usually we have: [TWAP of round X+2] > [TWAP of round X+1], unless the price tanks in round X+2.

Hence this is the correct method.

Every round has a TWAP (time-weighted average price).

It is determined at the end of the round, taking account of all trades in that round.

A temporary TWAP can be computed within the round and updated as time goes on.

it’s better to stake near the end of a round.

Round X ends. Round X+1 begins.

The temporary TWAP of round X+1 begins the same as the open price of round X+1.

When we are in round X+1, the temporary TWAP of round X+1 is updated as time goes on.

And TWAP of round X+1 is determined when round X+1 ends (that is, when round X+2 begins).

Now we are in round X+2.

Finally, TWAP of round X+2 is determined when round X+2 ends (that is, when round X+3 begins).

Then you can call payoff function for your stakes in round X.

In this case, BULLs in round X win, because [TWAP of round X+2] > [TWAP of round X+1].

So this is AlphaDex ( https://www.alphadex.org/ ) in one chart:

For a focused discussion of the x+2 vs x+1 process, please read Part 2 of this series: https://medium.com/@kitten.finance/alphadex-explained-in-images-part-2-bed309b6ca0a .

--

--