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:

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

TNLP:

- A maximum target (T)
- A maximum rate ®
- 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:

- Actual spread (W), fees is (F)
- Liquidity provided (M)
- 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%.