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

POC - Rolling Time Periods + Decay Two Period #4

Open
wants to merge 27 commits into
base: main
Choose a base branch
from

Conversation

bonedaddy
Copy link
Collaborator

@bonedaddy bonedaddy commented Aug 18, 2023

notes:

  • code was modified to add decay two period ability to rate limits, and add unit tests for decay two period logic however actual rate limits haven't been migrated to use decay two period
  • reason behind this is that actual integration requires significant refactoring to the rate limit functions / workflow

@@ -86,25 +86,30 @@ impl Flow {
/// (balance_in, balance_out) where balance_in in is how much has been
/// transferred into the flow, and balance_out is how much value transferred
/// out.
pub fn balance(&self) -> (Uint256, Uint256) {
pub fn _balance(&self) -> (Uint256, Uint256) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why these renames?

@nicolaslara
Copy link

Can you write some docs explaining this mechanism?

From skimming the code it seems to be similar to transmutter pools where the change capacity is bounded by the moving average of past capacity. Is the advantage here making the limit changes smoother?

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

Successfully merging this pull request may close these issues.

None yet

2 participants