Skip to content

Add 8 pool lucky raffle compute #2

@akiraonstarknet

Description

@akiraonstarknet
  1. Figure out a way to get senders of transactions and check if they are an account
  2. I could probably run an indexer on all transactions, read sender address.
  3. Anything that has > 3 txs in last week, select them.
  4. if has deposits on starknet, weight increases
  5. Create a raffle table
userId: Int
smashButtonCounts: number,
lastSmashButtonUpdated: Date (no time)
totalReward: STRK amount raw

reset smash button each time rewards are settled

model rewards

userId: Int
roundId: number
reward: raw amount
claimed: bool
expiryDate: Date
created, updated
  1. Basis this weights, do a lucky draw and add winners to db
  2. unclaimed rewards to get added to new round

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions