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

pallet teerdays #263

Merged
merged 24 commits into from
Jul 15, 2024
Merged

pallet teerdays #263

merged 24 commits into from
Jul 15, 2024

Conversation

brenzi
Copy link
Contributor

@brenzi brenzi commented Jul 4, 2024

branded as TEERdays, but could be a sober "tokentime" just as well. The pallet is generic for all native tokens.

We're introducing a new non-transferrable token "TEERdays" which can be earned by bonding TEER
TEERdays shall serve as a governance token for L2 shards (i.e. Incognitee).
Multiplying bond with time makes governance more resilient against deep pocket attackers who suddenly decide to allocate a lot of TEER to take over governance. The time factor acts like inertia to governance.

This pallet is only the minimum necessary to start collecting TEERdays

notes:

  • numeric stability:
    • 100years in milliseconds (Moment) are 42bits
    • 10MTEER with 12 digits are 60bits
    • 100years of total supply locked still fits u128
    • therefore, it is safe to use the Balance type for TEERdays

This PR also changes the toolchain to stable, except rustfmt

@brenzi brenzi changed the title pallet tokentime pallet teerdays Jul 5, 2024
@brenzi brenzi requested a review from clangenb July 5, 2024 09:51
Copy link
Contributor

@clangenb clangenb left a comment

Choose a reason for hiding this comment

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

Looks good to me, no unclarities.

But I do understand correctly that, so far, the Teerdays are not relevant elsewhere?

primitives/teerdays/src/lib.rs Show resolved Hide resolved
teerdays/src/weights.rs Show resolved Hide resolved
teerdays/src/tests.rs Show resolved Hide resolved
teerdays/src/tests.rs Show resolved Hide resolved
teerdays/src/tests.rs Outdated Show resolved Hide resolved
teerdays/src/tests.rs Outdated Show resolved Hide resolved
teerdays/src/lib.rs Show resolved Hide resolved
teerdays/src/lib.rs Show resolved Hide resolved
teerdays/src/lib.rs Show resolved Hide resolved
teerdays/src/lib.rs Outdated Show resolved Hide resolved
@brenzi
Copy link
Contributor Author

brenzi commented Jul 14, 2024

thank you. You're right: TEERdays are consumed nowhere. The nomination pallet is left to do where TEERdays will be applied

@brenzi brenzi merged commit 58b4c6a into master Jul 15, 2024
12 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.

2 participants