Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recommended BoundedType for some system params #2362

Open
wangjj9219 opened this issue Sep 30, 2022 · 1 comment
Open

Recommended BoundedType for some system params #2362

wangjj9219 opened this issue Sep 30, 2022 · 1 comment

Comments

@wangjj9219
Copy link
Member

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

@wangjj9219
Copy link
Member Author

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%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant