Given that now we have two admin related functions: recover and collectProtocolRevenue, implement invariants that make sure that any of the admin functions don't lead to an unexpected behaviour.
Implementation
contract FlowAdminHandler
functions collectRevenue and recover in FlowAdminHandler
variables mapping (IERC20 token => uint256) protocolRevenue and mapping (IERC20 token => uint256) aggregateBalance in FlowStore
functions token.transfer so that invariant can make random deposits to Flow contract
Discussed in https://github.com/sablier-labs/flow/discussions/239
Context
Given that now we have two admin related functions:
recover
andcollectProtocolRevenue
, implement invariants that make sure that any of the admin functions don't lead to an unexpected behaviour.Implementation
FlowAdminHandler
collectRevenue
andrecover
inFlowAdminHandler
mapping (IERC20 token => uint256) protocolRevenue
andmapping (IERC20 token => uint256) aggregateBalance
in FlowStoretoken.transfer
so that invariant can make random deposits to Flow contractInvariants