Simple Math & Incredible Results

\(x \times y = k\).

Look at that again.

\(x \times y = k\).

Uniswap Price Curve (k=1)

This is the main formula behind Uniswap pricing called the Constant Product Formula. It is a formula which has allowed a fully decentralized platform to successfully trade (sometimes with high slippage due to the trade size and subsequent move along the price curve) billions of USD in daily volume in place of a traditional order book.

Sometimes, the simple answer may just be a great one. The formula itself is quite simple: \(k\) is a constant which is set to the swap rate that the pool requires and \(x\) and \(y\) are simply the amounts of each token required to meet that liquidity condition. When we look at this formula it becomes quite obvious that large orders or large quantities of orders removing a large portion of one of the tokens can affect the amount of the other token required to meet \(k\). This affects the ratio and thus the price when swapping between the two assets.

Although the introduction of Uniswap V3 has introduced new features (and complexities) surrounding this simple formula, the Constant Product Formula has remained... constant.

Dimension Reduction

Having a large collection of data is always a wonderful thing because it allows inferences and dependencies to be gleaned. The problem with great amounts of data is the fact that using all of this data can lead to both overfitting and being struck by the curse of dimensionality. In this post I go over a basic approach to dimension reduction and some reasons why it is so important.

[Read More]

Hidden Markov Models

Hidden Markov Models are an excellent way to predict the upcoming steps of a Markovian Process, a stochastic process in which future and past states are independent conditional upon the present state, which contains hidden states. The properties of the Hidden Markov Model make it especially useful in time based pattern recognition and reinforcement learning.

[Read More]

Handling Missing Data

Missing data is a problem which plagues all manner of science and there are a number of ways which missing data can be dealt with. In this post I introduce the general ideas behind missing data, and demonstrate a few methods with which data missingness can be attacked.

[Read More]

Initial Post

Welcome to my page!

I’ve decided to let myself start with a bit of an open-ended possibility for what my page can contain.