Arbitrage Trading Formula Derivations

Go up to the main HW page (md)

How much to trade formula derivation

Let’s define some variables, all of which are known quantities.

The variable subscripts here all follow these rules:

Your current holdings in USD are: hbefore = qe * pe + qt * pt

You have two options as to how to interact with a DEX: you could trade in either ETH or TC. We’ll define those amounts as δe and δt, depending on which we are trading in.

If you are trading δt TC to the DEX (note that δt must be positive):