You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
scans all known v4 channels (via getting them from ${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 latest NewState+ApproveState via /channel/last-approved), and for each record in the tree, subtracts outpaceV4.withdrawnPerUser(channelId, user), and finally sums all the remaining maps - that way we calculate all the un-withdrawn DAI for all users
deposits enough USDT from the validator's identity into the main v5 channel (configurable) to cover the entire un-withdrawn amount; should use 1 USDT = 1 DAI exchange rate
saves a SpenderAggregate 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 rate
ensure it can only be ran once - mark the SpenderAggregate somehow (extra prop) so that we first check if it exists, and if so, we quit the script
Few additional notes:
yes, it will be possible to double spend by withdrawing on the new channel AND on the new old channels, if there are old channels that are not expired; we do not care about this, so we won't filter for expired channels only
The text was updated successfully, but these errors were encountered:
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: