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

Contract to track baklava Bonuses and Rewards #1371

Closed
7 tasks
timmoreton opened this issue Oct 16, 2019 · 0 comments
Closed
7 tasks

Contract to track baklava Bonuses and Rewards #1371

timmoreton opened this issue Oct 16, 2019 · 0 comments
Assignees
Labels
protocol All issues relating to protocol packages stake-off-bubble Issues under the Stake Off Engineering Bubble

Comments

@timmoreton
Copy link
Contributor

timmoreton commented Oct 16, 2019

In baklava, we will need to track two sets of values for each participating entity:

  • Bonuses, fixed sums that we will convert at some ratio to mainnet Gold but do not factor as a balance on the baklava testnet. Each bonus is a (value, reason).
  • Rewards, whose sum R_a for an account a is a multiplier such that a's score in the game is its balance multiplied by 1 + R_a . Each rewards is a (value, reason)

We expect the number of these to be small for each participant.

Make a smart contract that:

  • stores bonuses and rewards on a per account basis
  • associated view functions
  • only owner can append a bonus or reward
  • no initial balance needed, and nobody can withdraw balances
  • ability to populate initial data from migration to support testnet resets
  • script to dump current accounts and balances
  • CLI support for functions baklava:bonuses --account x and baklava:rewards --account x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
protocol All issues relating to protocol packages stake-off-bubble Issues under the Stake Off Engineering Bubble
Projects
None yet
Development

No branches or pull requests

2 participants