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

Optimize handling of GDA flows #270

Open
d10r opened this issue Feb 2, 2024 · 1 comment
Open

Optimize handling of GDA flows #270

d10r opened this issue Feb 2, 2024 · 1 comment

Comments

@d10r
Copy link
Collaborator

d10r commented Feb 2, 2024

Account estimation is done by looking at the current balance and net flowrate, allowing to predict the point in the future when it will run out of funds if its state doesn't change.

GDA flows are currently handled by making pessimistic estimations, looking only at the outflows (flowDistribution).
In case of accounts also having incoming GDA flows (being pool members) this can lead to those accounts often being re-queued into the estimation queue. Since re-estimation triggers an RPC requests, this modestly increases the number of RPC requests.

Once GDA gets high adoption, we can optimize this by looking at more GDA related events and adding the necessary logic to allow using looking at the GDA net flowrate (instead of just out flowrate) for less pessimistic estimations.

This requires keeping track of

  • all pools created
  • all distributions and flow distributions to pools
  • all member unit changes

This optimization needs to be implemented with care, such that changes related to pools with a very big number of members can't stall the process.

@d10r
Copy link
Collaborator Author

d10r commented May 15, 2024

this is now needed in order to keep the base-mainnet sentinel load in check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants