Rebalancing Infinity

The pool manager can set fees dynamically to incentivise pool rebalancing.

Let’s consider an Infinity pool with 100 bSOL,100 scnSOL, and no other assets. Now imagine there is a big swap of e.g. 90 bSOL —> scnSOL that almost wipes out the bSOL balance in the pool.

Assuming that the pool manager wants to maintain a 50-50 ratio of bSOL to scnSOL, we now have a “surplus” of scnSOL and a “deficit” of bSOL. We can provide an economic incentive to rebalance the pool by changing the input and output fees to something like the following:

assetinputFeeoutputFee

bSOL

10

0

scnSOL

0

10

Let’s see how the fees affect the swaps. We have the following fair prices:

  • 1 bSOL = 1.1073 SOL

  • 1 scnSOL = 1.1758 SOL

Consider a 1 scnSOL —> bSOL swap. What is the fee? Well, the inputFee for scnSOL is 0, and the outputFee for bSOL is also 0. Therefore, there is no fee, and the user will be given the fair rate of 1 scnSOL = 1.0619 bSOL (1 bSOL = 0.9417 scnSOL).

But now consider the reverse, a 1 bSOL —> scnSOL swap. In this case, the inputFee for bSOL is 10, and the outputFee for scnSOL is also 10. The total fee is therefore 20 bps. The adjusted rate after fees is $1.1073 * (1-0.002) = 1.1050854,$ which gives us a ratio of 1 bSOL = 0.9399 scnSOL.

Summarising the results:

1 bSOL = x scnSOL

No fees

0.9417

Regular fees

0.9412

High fees

0.9399

What does this mean? With this fee structure the swap from scnSOL → bSOL is cheap, while the swap from bSOL —> scnSOL is expensive. This of course makes perfect sense. Since the pool has a “deficit” of bSOL and a “surplus” of scnSOL, it offers cheaper rates for people willing to give scnSOL and take bSOL and higher rates for the reverse. In this way, Infinity’s dynamic fees encourage swaps that rebalance it.

This is not the only lever that the pool manager can pull. We have the option of a “manual rebalance”, where the manager unstakes from an LST and moves the stake manually to another LST. The manager can also rebalance via The Reserve pool, instant unstaking to SOL and then staking to another LST.

Last updated

Logo

Copyright © 2024 Sanctum Labs