Acala icon indicating copy to clipboard operation
Acala copied to clipboard

Recommended BoundedType for some system params

Open wangjj9219 opened this issue 3 years ago • 1 comments

after #2345 merged, we should review system params, decide which params should be replaced with BoundedType, with resonable range and max change abs

wangjj9219 avatar Sep 30 '22 02:09 wangjj9219

liquidation ratio for CDP

related:

  • field liquidation_ratio of RiskManagementParams

reasonable bounded for liquidation ratio:

  • min: 0%
  • max: Ratio::max()
  • max change abs: 50%

required collateral ratio for CDP

related:

  • field required_collateral_ratio of RiskManagementParams

reasonable bounded for required collateral ratio:

  • min: 100%
  • max: Ratio::max()
  • max change abs: 50%

stability fee for CDP

related:

  • field interest_rate_per_sec of RiskManagementParams

reasonable bounded for interest_rate_per_sec:

  • min: 0%
  • max: Rate::from_rational(21979553000, 10^18) // Annual interest rate 100%
  • max change abs: Rate::from_rational(3022266000, 10^18) // 10% ~ 19%

wangjj9219 avatar Sep 30 '22 03:09 wangjj9219