Diagrams
Flow Storage Layout
Each Flow contract is a singleton that stores all streams created by that contract's users. The following diagrams provide insight into the storage layout. To see the list of all storage variables, click here.
Function calls
Notes:
- The arrows point to the status on which the function can be called.
- The "update" comments refer only to the stream internal state.
st
is always updated toblock.timestamp
.- Red lines refers to the function that are doing an
ERC-20
transfer
Internal State
The stream struct has more fields than the ones shown here, but these are the most relevant ones.
ERC-20 Transfer Actions
Amount Calculations
Ongoing Debt
Uncovered Debt
Notes: A non-zero uncovered debt implies:
bal < sd
when the status isPAUSED
bal < sd + od
when the status isSTREAMING