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] deposit accounting bug when combining app credit and min deposit #1882

Open
2 tasks
d10r opened this issue Mar 7, 2024 · 0 comments · May be fixed by #1881
Open
2 tasks

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

d10r opened this issue Mar 7, 2024 · 0 comments · May be fixed by #1881
Assignees
Labels
Project: PROTOCOL-EVMv1 Superfluid protocol EVM v1 implementation in Solidity Type: Bug Something isn't working

Comments

@d10r
Copy link
Collaborator

d10r commented Mar 7, 2024

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
@d10r d10r added Project: PROTOCOL-EVMv1 Superfluid protocol EVM v1 implementation in Solidity Team: Protocol Protocol Core, Sentinel, Peripherals, Protocol Infrastructure Tools & DevOps Type: Bug Something isn't working labels Mar 7, 2024
@d10r d10r self-assigned this Mar 7, 2024
@d10r d10r linked a pull request Mar 7, 2024 that will close this issue
@hellwolf hellwolf removed the Team: Protocol Protocol Core, Sentinel, Peripherals, Protocol Infrastructure Tools & DevOps label Mar 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Project: PROTOCOL-EVMv1 Superfluid protocol EVM v1 implementation in Solidity Type: Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants