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

Fellowship Salary Budget & Period #121

Merged

Conversation

muharem
Copy link
Contributor

@muharem muharem commented Dec 11, 2023

Fellowship Salary Budget & Period

In alignment with the Fellowship Salary RFC, the projected total monthly budget stands at 240,833 USDt.

With this PR, I invite the Fellowship members to refine the following constant parameters:

  • RegistrationPeriod - # of blocks within a cycle which accounts have to register their intent to claim.
  • PayoutPeriod - # of blocks within a cycle which accounts have to claim the payout.
  • Budget - the total budget per cycle.

Please be aware that the pallet does not have a visibility into the actual balance of the account holding the salary budget. If this account lacks sufficient assets, subsequent salary claims will encounter failures.

@xlc
Copy link
Contributor

xlc commented Dec 11, 2023

I am not familiar enough with the salary pallet to understand the tradeoffs so could someone explain the downside of having long RegistrationPeriod / PayoutPeriod? and the whole process if it is already documented somewhere?

@muharem
Copy link
Contributor Author

muharem commented Dec 12, 2023

I am not familiar enough with the salary pallet to understand the tradeoffs so could someone explain the downside of having long RegistrationPeriod / PayoutPeriod? and the whole process if it is already documented somewhere?

RegistrationPeriod + PayoutPeriod essentially establish a salary period. It's worth consider default demotion and minimum promotion periods, which determine how often a member needs to approve their current rank and how frequently they can be promoted. I suppose, the former should not occur more than once a quarter or half a year, while the latter is defined as yearly in the manifest. These settings stored on-chain and will be set through a fellowship referendum. For more details, I would refer to the salary pallet documentation.

@muharem muharem mentioned this pull request Dec 12, 2023
@@ -251,7 +251,7 @@ impl pallet_salary::Config<FellowshipSalaryInstance> for Runtime {
// 15 days to claim the salary payment.
type PayoutPeriod = ConstU32<{ 15 * DAYS }>;
// Total monthly salary budget.
type Budget = ConstU128<{ 100_000 * USDT_UNITS }>;
type Budget = ConstU128<{ 250_000 * USDT_UNITS }>;
Copy link
Contributor

Choose a reason for hiding this comment

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

Actually, we will want to make this number configurable, as obviously we need to adjust the budget every once a while. This will be a good candidate to integrate with parameters pallet, whatever it is the one in ORML, or polkadot-sdk

Copy link
Contributor

Choose a reason for hiding this comment

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

if we want very very quick win for this release:

parameter_types! {
     pub storage Budget: u128 = 250_000 * USDT_UNITS`;
}
type Budget = Budget

and allow it for SafeCallFilter here

                // Allow to change dedicated storage items (called by governance-like)
		match call {
			RuntimeCall::System(frame_system::Call::set_storage { items })
				if items.iter().all(|(k, _)| k.eq(&Budget::key()))) => return true,
			_ => (),
		};

Copy link
Contributor

Choose a reason for hiding this comment

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

I prefer just do the correct way. the storage parameters is not in metadata and hard to work with in frontend

@bkchr bkchr enabled auto-merge (squash) January 7, 2024 23:36
@bkchr bkchr merged commit 85e37e0 into polkadot-fellows:main Jan 8, 2024
13 checks passed
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.

7 participants