Increase exchange fee in LLAMMa AMM


Gas fees become pretty large lately. That translates into soft-liquidation losses in LLAMMa (crvUSD). I propose to increase AMM exchange fee there to 1.9% (reasoning for the number explained below).


Band prices for neighboring bands are determined as p_{n+1} / p_n = (A - 1) / A. Or, band size can be seen as 1 - (A - 1) / A (1% in our case).

However, this only determines prices when price_oracle = current_price. If we fix the oracle price as constant, size of the band will actually be 1 - ((A - 1) / A)^2 (which is 1.99% for our A=100 case).

We want to raise fee to compensate for losses due to arb traders paying gas. It is, however, not good to have current band being from what it should be by more than 1 band. Therefore, I propose to increase the AMM fee to 1.9% which is slightly less than price_oracle=const size of the band around 2%.

It is important to verify that theoretical losses don’t increase much from it. I attach simulation results for losses vs fee for ETH without gas price being taken into account. Fee is suboptimal for “zero gas” environment but more appropriate for realistic Ethereum. Parameters of the markets can stay the same with such an adjustment.