-
Notifications
You must be signed in to change notification settings - Fork 44
Open
Description
Description
Create a script that distributes a bonus payment to workers who have their tokens staked. The script should identify eligible workers and send them an additional amount on top of their earnings for participating in jobs.
Motivation
Incentivizing staking among workers strengthens the token economy and encourages long-term alignment with the platform. This script automates the distribution of staking bonuses, making the reward system fair and consistent.
Implementation details
The script should:
- Query the subgraph to check which workers have tokens staked.
- Filter those who meet the configured eligibility conditions (e.g., minimum amount and duration).
- Send a bonus payment to each eligible worker’s wallet.
Configuration should be handled via environment variables:
- MIN_STAKED_AMOUNT: Minimum number of tokens staked to be eligible.
- MIN_STAKED_DAYS: Minimum duration tokens must be staked.
- STAKED_AMOUNT_INCREMENT: Token increment per bonus bracket. For every increment above MIN_STAKED_AMOUNT, the bonus increases. Example: If MIN_STAKED_AMOUNT=1000, STAKED_AMOUNT_INCREMENT=500, then the first bracket is 1000–1499, second is 1500–1999, etc.
- BONUS_PERCENTAGE_INCREMENT: Bonus percentage increase per bracket. Example: 2 means each bracket gives 2% more bonus.
- MAX_BONUS_PERCENTAGE: Maximum bonus percentage that can be awarded. Example: 10 limits the bonus to a max of 10%.
- PRIVATE_KEY: Private key of the account sending the payments.
- RPC_URL: Blockchain node endpoint to send transactions.
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Blocked