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

[ETHEREUM-CONTRACTS] CFA buffer semantics in conjunction with minimum deposit #1846

Open
3 tasks
d10r opened this issue Mar 4, 2024 · 0 comments
Open
3 tasks
Assignees

Comments

@d10r
Copy link
Collaborator

d10r commented Mar 4, 2024

What & Why

With the current CFA implementation, decreasing the flowrate could lead to the buffer to increase.
This happens in this scenario:

  • flow is created
  • a minimum deposit on the token is set to a value which exceed the deposit of the flow
  • the flowrate is decreased

This behaviour can be especially insidious for SuperApps where multiple incoming flows are bundled into one outgoing flow. In that scenario, the App is supposed to come up with additional funds for the increased buffer requirements, which adds considerable complication for an edge case.

Thus, the protocol behaviour shall be changed such that the minimum deposit is applied only if the flowrate is increased (which includes newly created flows, where the flowrate increases from 0 to x).

The behaviour for flowrate decreases may also change: keep the buffer as is (instead of behaving as if no minimum deposit were set).

AC

  • If decreasing the flow in a scenario as outlined above, do not increase the buffer
  • If decreasing the flow in a scenario as outlined above, keep the buffer as is (don't decrease)
  • Enumerate the possible combinations of min deposit change & flow change and have full test coverage for them
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

No branches or pull requests

2 participants