Proposal to decrease PoolRecoveryPeriod to 8hour(4800 block)

  • Terra research
  • November 20, 2020


  • Propose to change PoolRecoveryPeriod from 24hr(14400) to 8hr(4800)
  • By decreasing PoolRecoveryPeriod, native swap liquidity increases while defending front-running attacks at the same level


In governance proposal 11, 12 we submit governance proposals that :

  1. decrease minspread
  2. Increase base_pool

This was to improve liquidity of native swap function as our secondary market’s liquidity is improved and we expect there will be Terra demand outside of Chai. But, even though we increased base_pool to 625,000 SDR and decreased minspread to 0.5%, terra’s on-chain liquidity does not improve as we expected. So we need to find a way how we can increase more liquidity.

In Terra market module, there are two key parameters that prevent massive swap during a certain timeframe. Which are :

  • TerraPoolDelta
  • PoolRecoverryPeriod

To prevent massive swap from on-chain market, when the single swap trade happens, a TerraPoolDelta change in one direction. As the TerraPoolDelta changes, the spread goes up to increase trader’s trade cost. But, if the TerraPoolDelta only changed by the Trades, it causes a problem when we need one-side trade. For example, When Terra economy is in its expansion phase, we need continuous Luna to Terra swap to increase the total supply of Terra. But, if we only change TerraPoolDelta by trade, the spread of Luna to Terra swap will be kept increasing. So, to prevent this situation, we have parameter called PoolRecoveryPeriod.

At the end of each block, the market module will attempt to replenish the pools by decreasing absolute value of TerraPoolDelta. The rate at which the pool will be replenished toward equilibrium is set by parameter PoolRecoveryPeriod, which is the main parameter for this proposal. With lower periods meaning lower sensitive to trades, meaning previous trades are more quickly forgotten and the market is able to offer more liquidity. Current PoolRecoveryPeriod is 24hr in blocks, which means when one trade happens and if there are no trade, the TerraPoolDelta will converge to 0 in 24hr.

In this governance proposal, we suggest to decrease PoolRecoveryPeriod from 24hr to 8hr. Which means, when one trade happens and if there are no trade, the TerraPoolDelta will converge to 0 in 8hr. By decreasing TerraPoolDelta to 8hr, while the trading cost is same, terra native swap can handle more volume than current native swap.

The reason why we use PoolRecoveryPeriod for increasing liquidity of Terra native swap is, increasing PoolRecoveryPeriod is much more robust in terms of preventing Front-running or on-off chain arb because it has much less impact trading cost(slippage) of a single trade. If we choose to decrease minspread value or increase base_pool value to improve liquidity, it creates more space for attacks(front-running and arb) as the attack’s profit is heavily dependent on single trade cost. Decreasing minspread and increasing base_pool have direct impact on single trade’s trading cost(slippage) but, unlike those two parameters, PoolRecoveryPeriod have much less impact to single trade’s trading cost. Also, as we describe at the governance proposal 11 and 12, our base_pool and minspread value already consider attack possibilities so it is hard for us to use base_pool and minspread

In conclusion, we suggest to decrease PoolRecoveryPeriod from 24hr to 8hr to increase Terra native swap’s liquidity as we expect there will be more demand for Terra soon. The rationale behind choosing PoolRecoveryPeriod parameter for increasing liquidity is, if we choose base_pool or minspread parameter to increase liquidity, it creates more space for front-running & arb as those params had much more impact on single-trade cost(slippage).

Please share your thoughts/alternate proposals. A formal governance proposal will follow.