#tetcoin #framework #blockchain #crypto

no-std noble-tips

FABRIC noble to manage tips

Show the crate…

1 stable release

2.0.0 Apr 4, 2021

#73 in #tetcoin

Download history 19/week @ 2024-01-07 2/week @ 2024-01-14 4/week @ 2024-02-11 11/week @ 2024-02-18 28/week @ 2024-02-25 16/week @ 2024-03-03 22/week @ 2024-03-10 10/week @ 2024-03-17

76 downloads per month
Used in 8 crates (via node-runtime)

Apache-2.0

1.5MB
27K SLoC

Tipping Module ( noble-tips )

Note :: This noble is tightly coupled to noble-treasury

A subsystem to allow for an agile "tipping" process, whereby a reward may be given without first having a pre-determined stakeholder group come to consensus on how much should be paid.

A group of Tippers is determined through the config Trait. After half of these have declared some amount that they believe a particular reported reason deserves, then a countdown period is entered where any remaining members can declare their tip amounts also. After the close of the countdown period, the median of all declared tips is paid to the reported beneficiary, along with any finders fee, in case of a public (and bonded) original report.

Terminology

  • Tipping: The process of gathering declarations of amounts to tip and taking the median amount to be transferred from the treasury to a beneficiary account.
  • Tip Reason: The reason for a tip; generally a URL which embodies or explains why a particular individual (identified by an account ID) is worthy of a recognition by the treasury.
  • Finder: The original public reporter of some reason for tipping.
  • Finders Fee: Some proportion of the tip amount that is paid to the reporter of the tip, rather than the main beneficiary.

Interface

Dispatchable Functions

  • report_awesome - Report something worthy of a tip and register for a finders fee.
  • retract_tip - Retract a previous (finders fee registered) report.
  • tip_new - Report an item worthy of a tip and declare a specific amount to tip.
  • tip - Declare or redeclare an amount to tip for a particular reason.
  • close_tip - Close and pay out a tip.
  • slash_tip - Remove and slash an already-open tip.

Dependencies

~3–13MB
~145K SLoC