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

perf: Modifications to Configuration Parameters and Addition of Administrative Interfaces #94

Merged
merged 22 commits into from
Jul 8, 2024

Conversation

toints
Copy link
Contributor

@toints toints commented Jun 25, 2024

  1. Change the parameters from #[pallet::constant] to #[pallet::storage]

  2. Add the functionality to initialize parameters in GenesisConfig

  3. Add configuration interfaces:

    set_system_ratio
    set_treasury_ratio
    set_operation_ratio
    set_min_liquidation_threshold
    set_profit_distribution_cycle
  1. Add the ensure_root_or_admin function to check if the caller has sufficient permissions

toints added 9 commits June 14, 2024 15:51
…istrative Interfaces

1. Change the parameters from #[pallet::constant] to #[pallet::storage]

2. Add the functionality to initialize parameters in GenesisConfig

3. Add configuration interfaces:

```
    set_system_ratio
    set_treasury_ratio
    set_operation_ratio
    set_min_liquidation_threshold
    set_profit_distribution_cycle
```

4. Add the ensure_root_or_admin function to check if the caller has sufficient permissions
perf: add configuration parameters and administrative interface
- Added boundary checks for the following parameters:
  - SystemRatio, TreasuryRatio, and OperationRatio: Ensure the sum is <= 100%.
  - MinLiquidationThreshold: Ensure it is greater than ExistentialDeposit.
  - ProfitDistributionCycle: Ensure it is greater than 1.
Fixed: Add boundary checks for ratio and threshold parameters
wd30130
wd30130 previously approved these changes Jun 26, 2024
toints and others added 7 commits July 1, 2024 13:07
Copy link
Contributor

@Acaishiba Acaishiba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reviewed

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

Successfully merging this pull request may close these issues.

4 participants