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

The Ambassador Program #291

Merged

Conversation

muharem
Copy link
Contributor

@muharem muharem commented Apr 26, 2024

The Ambassador Program on Polkadot Collectives Parachain

Closes #264
Reflects https://polkadot.polkassembly.io/referenda/487

On Chain Structure

The on-chain program consists of three ranks:

  • Ambassadors (rank 1);
  • Senior Ambassadors (rank 2);
  • Head Ambassadors (rank 3);

Each rank has a corresponding Origin (Ambassador, SeniorAmbassador, HeadAmbassador), which represents the collective voice of members of that rank and above.

Referendum

The AmbassadorReferenda instance of referenda pallet consists of three tracks, each corresponding to an Origin. A referendum taken on senior ambassador track invites all members from rank 2 or above to vote and commands SeniorAmbassadors Origin. The referendum proposal can be submitted by any member from first rank or above.

Membership Management

Both Root and FellowshipAdmin Origins, commanded via public Polkadot referendum, can promote or demote members to and from any rank. Members themselves hold the power to promote or demote via program's referendum pallet instance. Senior members can promote candidates to the first rank, while head members can promote all members up to the second rank. Any member of the program can induct a new member to the collective as a candidate (0 rank). Promotion to the Head Ambassador or demotion from can be made with Polkadot OpenGov.

Sub-Treasury

The program operates its own sub-treasury, managed by OpenGov or Senior and Head Ambassadors. Members can spend up to 1k DOT on Senior Ambassador track and up to 10k DOT on Head Ambassadors track.

Additional Functionality

The AmbassadorCore instance of core fellowship pallet decorates the ranked collectives pallet with features like salary determination, activity/passivity registration, and the handling of promotion and demotion periods. Those parameters can be set by OpenGov or Head Ambassadors.

Periodic salaries in USDt, payable on Asset Hub, are introduced through the salary pallet. The total monthly budget is set to ( 10k * 21 ) USDt.

Rules that are not enforced on chain

  • 21 members at Head Ambassador rank;
  • candidates wont be removed automatically in 6 month;
  • collectives with less than 10 HA can onboard new members;

Source: https://polkadot.polkassembly.io/referenda/487cccccbegbjkdfhkrgekidfrhvkvilnbcvuitgnrcnkrr

@muharem muharem marked this pull request as draft April 26, 2024 18:36
/// - Each member with an excess rank of 0 gets 1 vote;
/// - ...with an excess rank of 1 gets 5 votes;
/// - ...with an excess rank of 2 gets 10 votes;
/// - ...with an excess rank of 3 gets 15 votes;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

there is no way with a current version of the pallet to describe the weights for the votes the way it is manifested (but it is possible if we update this convert contract in the pallet).
here I keep the proportion for SA and HA as in the document, but A gets less.

Copy link
Contributor

Choose a reason for hiding this comment

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

Interesting, thought it would be possible to basically hardcode a rank => weight table. I think the intent of the manifesto is that HA should be much more powerful because they can be highly outnumbered but are selected by general referendum. As in:

  • Can only be 21 HAs, but they are selected by all Polkadot holders,
  • Can be potentially 10s or 100s of SAs.

So for SA to overrule HA, it should take an extreme majority of SA.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Here I still keep proposition as in manifesto for SA vs HA, which is 1:5, because one excess rank gives you 5 more. But promotion changes for A vs SA, and A vs HA, 1:5 and 1:10 respectively which I think is less important.

},
min_support: pallet_referenda::Curve::LinearDecreasing {
length: Perbill::from_percent(100),
floor: Perbill::from_percent(0),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is according tot he manifesto, but are we sure we wanna allow the floor support as 0?

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't mind 0, we should force engagement, even if it's a default vote of Nay. But not a strong opinion either way.

>,
EitherOf<
MapSuccess<SeniorAmbassadors, Replace<ConstU128<{ 1 * GRAND }>>>,
MapSuccess<HeadAmbassadors, Replace<ConstU128<{ 10 * GRAND }>>>,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

in manifesto we have noting about an upper limit spend for HA, but I believe there should be some. this is open for conversation.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can start with this. If they come out opening 10k+ DOT proposals in the first few months then probably something is fishy.

@muharem muharem marked this pull request as ready for review April 28, 2024 09:16
@muharem muharem mentioned this pull request Apr 28, 2024
Comment on lines +267 to +268
pub struct AmbassadorEntities;
impl Contains<Location> for AmbassadorEntities {
Copy link
Contributor

Choose a reason for hiding this comment

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

This doesn't have anything for the BodyId. I guess they have no power outside their Treasury/Salary so maybe it is not important. We just have to make sure to add this if they ever do get some new power or need that origin. Perhaps put it in docs?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right. I cannot come up with a good location for such doc. If some collective plurality gets to manage something in Asset Hub, an engineer will need only to update an ensure origin impl for some pallet. I think an engineer should keep in mind that xcm execution is not for free by default.
We can also just grant a free xcm execution for all Collectives Parachain pluralities, but I am not sure if that will be true for all future pluralities.

/// - Each member with an excess rank of 0 gets 1 vote;
/// - ...with an excess rank of 1 gets 5 votes;
/// - ...with an excess rank of 2 gets 10 votes;
/// - ...with an excess rank of 3 gets 15 votes;
Copy link
Contributor

Choose a reason for hiding this comment

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

Interesting, thought it would be possible to basically hardcode a rank => weight table. I think the intent of the manifesto is that HA should be much more powerful because they can be highly outnumbered but are selected by general referendum. As in:

  • Can only be 21 HAs, but they are selected by all Polkadot holders,
  • Can be potentially 10s or 100s of SAs.

So for SA to overrule HA, it should take an extreme majority of SA.

>,
EitherOf<
MapSuccess<SeniorAmbassadors, Replace<ConstU128<{ 1 * GRAND }>>>,
MapSuccess<HeadAmbassadors, Replace<ConstU128<{ 10 * GRAND }>>>,
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can start with this. If they come out opening 10k+ DOT proposals in the first few months then probably something is fishy.

min_support: pallet_referenda::Curve::LinearDecreasing {
length: Perbill::from_percent(100),
floor: Perbill::from_percent(0),
ceil: Perbill::from_percent(50),
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't this be like the Fellowship?

Suggested change
ceil: Perbill::from_percent(50),
ceil: Perbill::from_percent(100),

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is how I read it from manifesto

All tracks should have a voting period of seven days, with a linear curve such that greater than 50% turnout unanimously in favor can pass a motion at its start and a simple majority of voters at the end (as in, no turnout requirement).

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, you are correct. Maybe the Fellowship is wrong. 100% support doesn't make sense.

},
min_support: pallet_referenda::Curve::LinearDecreasing {
length: Perbill::from_percent(100),
floor: Perbill::from_percent(0),
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't mind 0, we should force engagement, even if it's a default vote of Nay. But not a strong opinion either way.

@joepetrowski joepetrowski mentioned this pull request May 1, 2024
10 tasks
muharem and others added 2 commits May 2, 2024 11:20
Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>
type RuntimeEvent = RuntimeEvent;
// Promotions must be done through the [`crate::AmbassadorCore`] pallet instance.
#[cfg(not(feature = "runtime-benchmarks"))]
type PromoteOrigin = frame_support::traits::NeverEnsureOrigin<Rank>;
Copy link
Contributor

@Doordashcon Doordashcon May 10, 2024

Choose a reason for hiding this comment

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

Should be RemoveOrigin?

Copy link

Review required! Latest push from author must always be reviewed

@acatangiu
Copy link
Contributor

/merge

1 similar comment
@joepetrowski
Copy link
Contributor

/merge

@fellowship-merge-bot fellowship-merge-bot bot merged commit b0a3eff into polkadot-fellows:main May 20, 2024
37 checks passed
@fellowship-merge-bot
Copy link
Contributor

Enabled auto-merge in Pull Request

Available commands
  • /merge: Enables auto-merge for Pull Request
  • /merge cancel: Cancels auto-merge for Pull Request
  • /merge help: Shows this menu

For more information see the documentation

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.

Ambassador Program Per Referendum 487
4 participants