Skip to content

[ETHEREUM-CONTRACTS] deposit accounting bug when combining app credit and min deposit #1882

Open
@d10r

Description

@d10r

What

The following behaviour was noticed while working on #1846:

  • A token with min deposit set is used.
  • Alice creates a flow to a SuperApp which uses app credit, with the flowrate being such that minDeposit is applied. Since the mitDeposit is applied for the (forwarded) flow of the SuperApp too, alice's deposit now is 2 x minDeposit (1 x for own flow + 1 x for owed deposit)
  • Alice updates the flow to another flowrate below the minDeposit threshold. One would expect the deposit to remain the same. Instead, the deposit now suddenly is just 1 x minDeposit.

AC

  • Fuzz test for the invariant: for any combination of flowrate changes to a SuperApp just forwarding the flow, the resulting deposit should be deterministic according to the deposit rule
  • Test passing

Metadata

Metadata

Assignees

Labels

Project: PROTOCOL-EVMv1Superfluid protocol EVM v1 implementation in SolidityType: BugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions