superfluid-finance / protocol-monorepo

Superfluid Protocol Monorepo: the specification, implementations, peripherals and development kits.
https://www.superfluid.finance
Other
875 stars 239 forks source link

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

Open d10r opened 9 months ago

d10r commented 9 months ago

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