Skip to content

Deposit capacity limits net instead of gross deposits#318

Draft
tim-barry wants to merge 1 commit intotim/117-queued-deposits-health-withdrawalfrom
tim/265-deposit-capacity-limits-net-deposits-only
Draft

Deposit capacity limits net instead of gross deposits#318
tim-barry wants to merge 1 commit intotim/117-queued-deposits-health-withdrawalfrom
tim/265-deposit-capacity-limits-net-deposits-only

Conversation

@tim-barry
Copy link
Copy Markdown
Collaborator

Closes: #265

Description

Withdrawing from the token reserve refills the deposit capacity for both the individual position and the token as a whole, so that the deposit capacity tracks net deposits rather than gross deposits.

  • Per-position (per-user) deposit limit cannot grow beyond the maximum (depositCapacityCap * fraction)
  • Overall token deposit limit can temporarily grow beyond the depositCapacityCap over the regeneration period (one hour) before the limit is reset to the capacity. This means that excess deposit limit generated by withdrawals is regularly reset to the baseline rather than accumulating indefinitely over time (which would allow steady withdrawal followed by sudden large deposit amounts).

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.

1 participant