-
Notifications
You must be signed in to change notification settings - Fork 11
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
Compensation for V4 publishers: script #343
Comments
Ivshti
changed the title
Compensation for v4 publishers: script
Compensation for V4 publishers: script
Mar 23, 2021
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Implement a script that:
${cfg.validatorUrl}/channel/list
, not via DB cause we may run v5 validators in a different setup) and gets the last balance tree map (by getting the latestNewState+ApproveState
via/channel/last-approved
), and for each record in the tree, subtractsoutpaceV4.withdrawnPerUser(channelId, user)
, and finally sums all the remaining maps - that way we calculate all the un-withdrawn DAI for all usersSpenderAggregate
in the DB that spends this deposited amount to distribute it to the users with un-withdrawn funds; should use 1 USDT = 1 DAI exchange rateSpenderAggregate
somehow (extra prop) so that we first check if it exists, and if so, we quit the scriptFew additional notes:
The text was updated successfully, but these errors were encountered: