HackMD
    • Create new note
    • Create a note from template
    • Sharing Link copied
    • /edit
    • View mode
      • Edit mode
      • View mode
      • Book mode
      • Slide mode
      Edit mode View mode Book mode Slide mode
    • Customize slides
    • Note Permission
    • Read
      • Only me
      • Signed-in users
      • Everyone
      Only me Signed-in users Everyone
    • Write
      • Only me
      • Signed-in users
      • Everyone
      Only me Signed-in users Everyone
    • Commenting & Invitee
    • Publishing
      Please check the box to agree to the Community Guidelines.
      Everyone on the web can find and read all notes of this public team.
      After the note is published, everyone on the web can find and read this note.
      See all published notes on profile page.
    • Commenting Enable
      Disabled Forbidden Owners Signed-in users Everyone
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Invitee
    • No invitee
    • Options
    • Versions and GitHub Sync
    • Transfer ownership
    • Delete this note
    • Note settings
    • Template
    • Save as template
    • Insert from template
    • Export
    • Dropbox
    • Google Drive Export to Google Drive
    • Gist
    • Import
    • Dropbox
    • Google Drive Import from Google Drive
    • Gist
    • Clipboard
    • Download
    • Markdown
    • HTML
    • Raw HTML
Menu Note settings Sharing Create Help
Create Create new note Create a note from template
Menu
Options
Versions and GitHub Sync Transfer ownership Delete this note
Export
Dropbox Google Drive Export to Google Drive Gist
Import
Dropbox Google Drive Import from Google Drive Gist Clipboard
Download
Markdown HTML Raw HTML
Back
Sharing
Sharing Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Comment & Invitee
Publishing
Please check the box to agree to the Community Guidelines.
Everyone on the web can find and read all notes of this public team.
After the note is published, everyone on the web can find and read this note.
See all published notes on profile page.
More (Comment, Invitee)
Commenting Enable
Disabled Forbidden Owners Signed-in users Everyone
Permission
Owners
  • Forbidden
  • Owners
  • Signed-in users
  • Everyone
Invitee
No invitee
   owned this note    owned this note      
Published Linked with GitHub
Like BookmarkBookmarked
Subscribed
  • Any changes
    Be notified of any changes
  • Mention me
    Be notified of mention me
  • Unsubscribe
Subscribe
# Participation Lotteries on Kusama This document outlines how a configurable, reoccurring lottery system can be used to drive participation on the Kusama network. ## Goal Participation in Kusama is relatively low. * Average number of votes per elected council member: 30 * Number of Society members: 5 * Number of votes on current democracy process (Ref 79): 20 Polkascan reports there are [~17,000 active accounts](https://polkascan.io/kusama) on Kusama. The goal of Participation Lotteries is to stimulate participation on the Kusama network by giving an additional incentive for users to participate. ## User Story Imagine... The Kusama network is going to have a very important decision to be made through a democracy proposal. (Maybe a re-denomination...?) The network wants to stimulate participation of this vote by the end users, so it creates a new lottery. Council, or some other origin with access will start a new lottery using the "vote" extrinsic. This lottery will be initialized with some funds from treasury to start the pot. Let's say 50 KSM Users who want to opt into this lottery can do so by calling the `vote` extrinsic wrapped in a `buy_ticket` extrinsic. (Think like how we wrap calls for `sudo`). By calling the `buy_ticket` extrinsic and wrapping the underlying call, the user purchases a 1 KSM ticket into the lottery, and the lottery pot increases by 1 KSM. Users who are not interested in the lottery can simply choose to call `vote` directly. Nothing here is changed. Users will continue to participate in the lottery until the lottery period is completed. (This lottery period will likely be tied to the event at hand, for example the time until the vote expires, the end of an Era/Epoch, etc...) Once the lottery period is over, a random user among those participating will be selected and win the entirety of the pot. Details below. ## Game Theory As with any game on the blockchain, there needs to be reasonable incentives and disincentives for users to behave the way we want. ### Incentives The lottery is seeded by some funds from the treasury. As a result, any participant entering the lottery would have positive expected value (EV). We can use the `seed` amount to control participation. The higher the seed, the larger the EV for a larger number of participants. In general, it would seem that humans love to participate in lotteries. The chance to win a lot of money at little cost triggers something that may not always make economically sound decisions. It is possible that this lottery system incentivizes "mindless" participation by users not interested in the underlying call, but just interested in participating in the lottery. AFAIK, this is unavoidable in any participation incentive mechanism. However, I think that on average, the network will benefit from more participation as a whole. ### Disincentives One potential issue with lotteries on the blockchain is that it is somewhat vulnerable to Sybil attacks. i.e. given that participating is positive EV, a user could create many many entries into the lottery to have a high chance of winning. However, this can also be limited and controlled through fees and the `seed` amount. In order for a user to successfully complete such an attack, they would need to transfer at least the ticket price amount of tokens to N accounts. Then each of the N accounts need to submit a wrapped extrinsic for the underlying call to be made, which involves its own transaction fee on top of the ticket price. That means that such an attack would cost `N * (transfer_fee + account_creation_fee + call_fee)` tokens. If the treasury seed is below this amount, the user is no longer incentivized to participate. Furthermore, margins would be slim for such a user, and continue to worsen as more users join. ### Other Important Points To complete a lottery, we need to be able to randomly select a winner. Substrate/Kusama provides on chain randomness that is used for other parts of the network. It may be at certain absurd lottery pots, that block producers may be incetivized to hold back blocks which they are not the winner of the lottery, or some other negative incentives... Would potentially need feedback from W3F research team who knows more about the limits of using this randomness. It would of course not be controllable directly by a user. ## Network Effects A participation lottery can be used to drive forward the following behavioral changes to the network by attaching a lottery to a specific extrinsic: * Have more users share their voice on important elections. (`vote`) * Have users change/update their validator nominations on a regular schedule. (`nominate`) * Have more users join Society or other similar social experiments (`put_bid`) * Encourage brainstorming of ideas in future updates and changes (`propose_bounty`) * Have more users (change their) backing of (candidate) council members (`electionPhragmen`,`vote`) * etc... ## How This section describes how a Participation Lottery may be implemented. Some details of the implementation are "known" and some things are "flexible"/"unknown". ### Known * A new pallet will be created which manages these auctions. * The pallet will be configurable to allow any call(s) in the runtime to be the source of buying a ticket. * A configurable `seed` amount will be allocated from a funding source (like treasury) to kick off lotteries. * Users will pay a configurable `ticket_price` to participate in lottery, this will be placed in the pool. * Winners will be determined at some non-user-controllable future block, and use the on-chain randomness to pick a winner. * More to be added... ### Flexible * Lotteries can be regularly scheduled or initiated explicitly each time by governance. * Multiple extrinsics can be whitelisted at once for one lottery. * Participation can be limited 1 per lottery or 1 per extrinsic per lottery. * Could have more than one lottery winner, maybe with lesser prize payouts. * Previous lottery can be used to seed next lottery. * More to be added.... ## Delivery Initial estimates predict that this end to end development should take 5 full days (spread over 2 - 3 weekends). For that work, a suggested budget of 250 KSM should be allocated. To deliver this feature the following tasks need to be completed (with suggested delivery cost): * [ ] Create the basic pallet structure/idea. (100 KSM) * [ ] Refine pallet based on feedback and discovered limitations. (50 KSM) * [ ] Write comprehensive tests ensuring safety of the pallet. (50 KSM) * [ ] Benchmark and weigh the pallet for production use. (50 KSM) * [ ] Have the pallet reviewed and merged by Parity development team. It is possible that delivery may be delayed slightly based on unforeseen factors, but that should be made clear at milestone 2 where we need to refine the pallet based on feedback. ## Questions Feel free to add questions to this document below: - [x] This seems like a project with similar complexity as the Bounty project. If this project is going to proposed as a Bounty, the council should get a ball-park figure to Budget this expense. I feel we need to evaluate actual cost/expenses (time spent * rate) of the Bounty project to allow proper budgetting of this project. (by Emiel) > I would propose an initial budget of 250 KSM for approximately 5 days of work (~2 weekends), and any additional budget can come from donations if people are satisfied with my work and my timeliness. - [ ] Make a question like this. > I will answer like this. ## Multi-winner algorithm Extra section by Jeff Burdges. Please move to where appropriate. We wait enough BABE or Sassafras epochs so that the epochal randomness from BABE or Sassafras becomes fresh, which takes an extra epoch or so under Sassafras. As $\textsf{vrf_output}$ iterate over the VRF output of the first $n$ slots of this fresh epoch, or maybe primary slots in BABE's case, we award one share of the pot to each voter identenfied by $$ H(\textsf{vrf_output} || \textsf{lottery_id}) \mod \textsf{num_voters} $$ These winnings would not be dust if $n$ is small enough. We have security arguments for BABE/Praos and soon Sassafras in which one proves that one honest (primary) block producers per epoch makes the epoch randomness unbiasable enough that the next epoch has (many) honest block producers. Yet, these results say little about the actual bias levels: - Epochal randomness remains quite biasable due to block producers choosing their ancestors both before and after epoch ending. Also adversaries could bias previous epochal randomness, with perhaps slightly more than one bit of influence per slot, so that they control many block production slots around the epoch boundary. We use epocal randomness irectly in parachain auctions because the winnings are high stakes but this remains imperfect and benefits from a VDF (see https://github.com/w3f/research-internal/issues/50). - Individual block VRF outputs remain biasable by block producers notcreating their blocks, which consts them rewards. If $n$ is large enough then the winnings adjustment is less than block rewards, and nobody would not make a block so that their own winning voters capture more of the rewards. ### Layman * jeff In short, you fix a bunch of future slots that determine the multiple winners, adding more or less slots so that each winners winnings are neither dust nor higher than the block reward, and then you let the BABE VRF for primary slots or non-ring VRF in Sassafras determine winners. As you say, these lotteries are not on the scale that validators would do malicious things, but this guideline can actually be enforced with multiple winners. of course maybe the game is less fun if the winnings are less than block rewards. :) * shawntabrizi so: 1. start lottery 2. collect funds until end 3. divide total funds by block reward amount to get N sized winnings each of size block reward (or slightly less, whatever) 4. at the start of a new validator set, pick one winner per block until all funds are distributed * jeff yes I have not figured out if one should only use primary slots in babe or not. I guess only primary, whic means a factor of like 4 in there * shawntabrizi primary slots you mean that if the main block producer doesnt make a block, but the secondary block producer does, we should not pick a winner * jeff yes

Import from clipboard

Advanced permission required

Your current role can only read. Ask the system administrator to acquire write and comment permission.

This team is disabled

Sorry, this team is disabled. You can't edit this note.

This note is locked

Sorry, only owner can edit this note.

Reach the limit

Sorry, you've reached the max length this note can be.
Please reduce the content or divide it to more notes, thank you!

Import from Gist

Import from Snippet

or

Export to Snippet

Are you sure?

Do you really want to delete this note?
All users will lost their connection.

Create a note from template

Create a note from template

Oops...
This template is not available.


Upgrade

All
  • All
  • Team
No template found.

Create custom template


Upgrade

Delete template

Do you really want to delete this template?

This page need refresh

You have an incompatible client version.
Refresh to update.
New version available!
See releases notes here
Refresh to enjoy new features.
Your user state has changed.
Refresh to load new user state.

Sign in

Forgot password

or

By clicking below, you agree to our terms of service.

Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox

New to HackMD? Sign up

Help

  • English
  • 中文
  • Français
  • Deutsch
  • 日本語
  • Español
  • Català
  • Ελληνικά
  • Português
  • italiano
  • Türkçe
  • Русский
  • Nederlands
  • hrvatski jezik
  • język polski
  • Українська
  • हिन्दी
  • svenska
  • Esperanto
  • dansk

Documents

Tutorials

Book Mode Tutorial

Slide Mode Tutorial

YAML Metadata

Contacts

Facebook

Twitter

Discord

Feedback

Send us email

Resources

Releases

Pricing

Blog

Policy

Terms

Privacy

Cheatsheet

Syntax Example Reference
# Header Header 基本排版
- Unordered List
  • Unordered List
1. Ordered List
  1. Ordered List
- [ ] Todo List
  • Todo List
> Blockquote
Blockquote
**Bold font** Bold font
*Italics font* Italics font
~~Strikethrough~~ Strikethrough
19^th^ 19th
H~2~O H2O
++Inserted text++ Inserted text
==Marked text== Marked text
[link text](https:// "title") Link
![image alt](https:// "title") Image
`Code` Code 在筆記中貼入程式碼
```javascript
var i = 0;
```
var i = 0;
:smile: :smile: Emoji list
{%youtube youtube_id %} Externals
$L^aT_eX$ LaTeX
:::info
This is a alert area.
:::

This is a alert area.

Versions

Versions and GitHub Sync

Sign in to link this note to GitHub Learn more
This note is not linked with GitHub Learn more
 
Add badge Pull Push GitHub Link Settings
Upgrade now

Version named by    

More Less
  • Edit
  • Delete

Note content is identical to the latest version.
Compare with
    Choose a version
    No search result
    Version not found

Feedback

Submission failed, please try again

Thanks for your support.

On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

Please give us some advice and help us improve HackMD.

 

Thanks for your feedback

Remove version name

Do you want to remove this version name and description?

Transfer ownership

Transfer to
    Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

      Link with GitHub

      Please authorize HackMD on GitHub

      Please sign in to GitHub and install the HackMD app on your GitHub repo. Learn more

       Sign in to GitHub

      HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.

      Push the note to GitHub Push to GitHub Pull a file from GitHub

        Authorize again
       

      Choose which file to push to

      Select repo
      Refresh Authorize more repos
      Select branch
      Select file
      Select branch
      Choose version(s) to push
      • Save a new version and push
      • Choose from existing versions
      Available push count

      Upgrade

      Pull from GitHub

       
      File from GitHub
      File from HackMD

      GitHub Link Settings

      File linked

      Linked by
      File path
      Last synced branch
      Available push count

      Upgrade

      Danger Zone

      Unlink
      You will no longer receive notification when GitHub file changes after unlink.

      Syncing

      Push failed

      Push successfully