sablier-labs / flow

🍃 Smart contracts of the Sablier Flow protocol.
Other
8 stars 0 forks source link

test(invariant): add admin handler contract #270

Closed andreivladbrg closed 2 weeks ago

andreivladbrg commented 3 weeks ago

Closes

Note: I decided to limit the number of calls to admin-related functions to 10, as they will be called infrequently.

andreivladbrg commented 2 weeks ago

Great work

thank you

$\text{all stream balance sum} + \text{revenue} = \text{aggregate balance}$ to compare the stream balance, aggregate balance and revenue.

You’re right, I forgot to add it


I have pushed two new commits to address your feedback, lmk if it looks good

smol-ninja commented 2 weeks ago

There was a failing fuzz test in this PR's CI (click to see). I was also able to reproduce it locally: https://app.warp.dev/block/vXtx2ThCxIXIzIbSY4dfHl.

Resolved it via https://github.com/sablier-labs/flow/commit/8d0e464416b2780c784e1a86042af12faac41224. Due to precision loss, the depletion timestamp could be a time range when decimal is low. And during that range, the refundable amount could be zero.