Math deep dive

Position constructing

1'st subPosition (borrowing notional)

2'nd subPosition (borrowing asset)

Delta-neutrality condition

Taken Delta = 0 at opening (T=0):

that's why we put N/4 in first subPosition and 3N/4 in second.

Generalized equation for delta of position​


Definitions in terms of typical LYF-protocol interface (Tulip, Francium, Alpaca, Tarot)

Positions' and debts' values after rebalancing:

How to calculate those value changes:

The result

This cash flows totally define the algorythm of rebalancing in general. It can be implemented in any LYF protocol after fitting to protocol's interface.

Here is the backtesting result of sample strategy, using Francium's SOL-USD pool characteristics with 3'rd leverage:

Last updated