A Mathematical Interpretation of TNLPs

I’ve wanted to do this for some time. I will define TNLPs (TLLPs) in a second, but first Iwill define custodians.
A custodian is a pseudo continuous participant in the tnlp with several parameters:

  1. A maximum total liquidity (L)
  2. Some % of funds on the buy side (Y)
  3. An ideal provision rate at which the provider would accept 0% spread after fees §

TNLP:

  1. A maximum target (T)
  2. A maximum rate ®
  3. A maximum spread after fees (S)

I assume rate is symmetric and target includes T/2 on buy side and T/2 on sell side.

The resulting conversation gives the following parameters:

  1. Actual spread (W), fees is (F)
  2. Liquidity provided (M)
  3. Rate paid (K)

For the moment, let’s just try to build some basic equations. Assume P=R and S=0 and only 1 custodian, then:
K=P=R
W=F
M=min(L*Y,T/2)+min(L/Y,T/2)

If we put in multiple providers, the equation is actually the same with L being the total sum of everyone’s liquidity as long as P=R.

If we decide to decrease R, we will need to increase S to compensate. Here, we can use a concept of daily volume (V) times S which gives an amount won per day by the liquidity provider (V is not the same as the total daily pair volume, just the trades providers were involved in).

Now, if R=0.9P, we want to keep M the same.
S = 0.1P * M/V
So if you want to go down from 1%/day to 0.9%/day with 5,000 nbt liquidity and 500 nbt daily volume, spread after fees needs to be 1%. This gives a W = F+1%.

A tantalizing relaxation to make is that P is the same for all custodians. If we promote L to a function of P, we get a continuous limit of having many liquidity providers all at different rates. That function is most likely smooth and experiences a rapid increase around a particular rate at which liquidity provision becomes profitable. In my mind, the derivative of L (dL/dP, these should probably be partial derivatives) most likely looks something like a Gaussian distribution with that profitability point as the inflection point in the liquidity curve.

In the other limit of having just 1 liquidity provider, it looks more like a fermi-dirac distribution because that provider most likely either provides or doesn’t provide depending on the rate.

1 Like