Tricrypto dynamic fee parameters research and proposal

Preface

After optimizing TriCRV pool with somewhat-high out_fee, I noticed that it reaches low fees much faster than tricrypto pools (which have out_fee lower). In addition, it seems to show a much better fee APY. Hence, I decided to re-apply same approach to optimizing tricrypto pools, and saw some interesting results. Tricryptos in simulations show APY (before admin fee) somewhere between 3 and 5% which somewhat matches the performance of tricrypto2 (which is very well arbitraged) but not yet tricrypto-NGs.

Approach
Idea appeared rather simple. We set amplification fixed (say A=10) as well as mid_fee and out_fee. Here I chose mid_fee = 0.03%, and out_fee varied from 0.8% to 5.0% in different simulations. For each value of out_fee I performed a 2D scan (fee_gamma, gamma). The parameter fee_gamma is responsible for the steepness of dynamic fee function, and gamma is responsible for the width of the concentrated liquidity part of the liquidity distribution.
In each of the scans, we find maximum APY, and keep track of volume and average slippage in the point of maximum APY. We are looking for the maximum of volume / minimum of slippage in those points of maximum APY as we scan out_fee.

Raw simulation results
The simulation results are located on Github. Here I attach pictures for different parameters just for the beauty of them.

out_fee=0.8%:
APY:


Slippage:

Volume:

out_fee=1.2%:
APY:


Slippage:

Volume:
vol

out_fee=2%:
APY:


Slippage:

Volume:

out_fee=2.5%:
APY:


Slippage:

Volume:

out_fee=3%:
APY:


Slippage:

Volume:

out_fee=3.5%:
APY:


Slippage:

Volume:

out_fee=4%:
APY:


Slippage:

Volume:

out_fee=5%:
APY:
apy
Slippage:


Volume:

Summary graphs



Conclusion
It can be seen that maximum volume and minimal slippage (while APY is maximized in fee_gamma x gamma scan) occurs at out_fee=3% when mid_fee=0.03%. The value of fee APY there is 44%, around 10x of what we currently have at the best conditions.
Keep in mind that these are just simulations, and one should be careful with conclusions. The real numbers are to be seen in practice.

Proposal
Change parameters of trcicryptoUSDT first to (A=10, gamma=4.01e-5, fee_gamma=7.34e-5). Keep in mind that in the contract one should multiply this A by 3**3 * 10000. After that, observe how it behaves in comparison with tricryptoUSDC. If we like the results - change parameters of that one and TricryptoLLAMA to the same. Also, reduce allowed_extra_profit and adjustment_step for a more precise and fast price_scale adjustment (same as in TriCRV will do).

3 Likes