Skip to main content

Access Control List (ACL)

The Access Control List (ACL) in Superfluid allows any account (either a plain Ethereum account or a smart contract) to configure permissions for another account to manage streams on its behalf. It's akin to the money streaming version of the ERC20 approval mechanism.

ACL Mechanism Illustration

Visualization showing the user creating a flow through FlowSender and all of the streams that have been created

Understanding the functions provided by the ACL involves grasping the flowRateAllowance and permissions parameters.

flowRateAllowance Parameter

The flowRateAllowance can be visualized as a tank that you fill to a certain level for the flowOperator account through your updateFlowOperatorPermissions call. This allowance is then spent by the flowOperator as needed. Every increase in a flow rate on your behalf depletes the flowRateAllowance, while decreases in your flow rate or deletion of a stream do not affect it.

Example:

Imagine giving an operator a flowRateAllowance of 1000 tokens per month (equivalent to a flow rate of 385802469135802 tokens per second). If they create a stream with a flowRate of 500 tokens per month for you, the remaining flowRateAllowance would be 500 tokens per month. Further, if they increase another stream's flow rate by 250 tokens per month, the flowRateAllowance reduces to 250 tokens per month.

permissions Parameter

The permissions value, ranging from 1 to 7, specifies the level of access an operator has over your streams. This is set when calling updateFlowOperatorPermissions.

Permission TypeParameter Value
Create1
Update2
Create or Update3
Delete4
Create or Delete5
Delete or Update6
Create, Update, or Delete7