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
What & Why
With the current CFA implementation, decreasing the flowrate could lead to the buffer to increase. This happens in this scenario:
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