Skip to main content

Contracts

Flow State's two onchain products — Flow Splitters and Flow Councils — both settle funds through Superfluid distribution pools (GDA). The platform reads and writes these contracts through the ABIs bundled in src/lib/abi/. This page is an orientation map; for the full Flow Splitter interface see the generated IFlowSplitter reference.

Bundled ABIs

The ABIs the app links against live in src/lib/abi/:

FileExported ABIUsed for
flowSplitter.tsflowSplitterAbiThe Flow Splitter contract
flowCouncil.tsflowCouncilAbiThe Flow Council contract
flowCouncilFactory.tsflowCouncilFactoryAbiDeploying new Flow Councils
superAppSplitter.tssuperAppSplitterAbiSuper App splitter variant
superAppSplitterFactory.tssuperAppSplitterFactoryAbiDeploying Super App splitters
erc721.tserc721AbiNFT reads (gating, ownership)

Flow Splitter

The Flow Splitter creates a Superfluid distribution pool and assigns proportional units to its members, then streams or distributes a Super Token to them according to those units. Pool creation, member units, admins, and the metadata string are all set through the contract.

The metadata string is where the platform stores a Splitter's listing visibility (the {"listed":true} / {"listed":false} flag); see Architecture for how that round/pool metadata is consumed.

Flow Council

A Flow Council is an access-controlled contract: a set of voters allocate voting power across recipients, and the resulting weights drive a Superfluid distribution pool. Permissions are gated by three OpenZeppelin-style role hashes, defined in src/app/flow-councils/lib/constants.ts:

Role constantHashProduct nameGates
DEFAULT_ADMIN_ROLE0x0000…0000Super AdminFull administration, including granting/revoking the other roles
VOTER_MANAGER_ROLE0xe39c…8248Voter ReviewAdding, removing, and updating voters (membership management)
RECIPIENT_MANAGER_ROLE0xe555…1c2eRecipient ReviewManaging the recipients eligible to receive flow

These roles gate the membership and recipient-management actions exposed in the council UI. For example, the GoodDollar self-claim flow works by granting VOTER_MANAGER_ROLE to a Flow State-operated bot address, which then adds verified voters on the council's behalf.

info

DEFAULT_ADMIN_ROLE is the zero hash, the standard OpenZeppelin AccessControl admin role. Holding it lets an account grant and revoke both VOTER_MANAGER_ROLE and RECIPIENT_MANAGER_ROLE.

Superfluid GDA

Both products distribute funds through Superfluid's General Distribution Agreement (GDA) — the "distribution pool" primitive. Members hold units in a pool, and a Super Token is distributed (instantly or as a continuous stream) in proportion to those units. The platform does not reimplement this logic; it composes the existing Superfluid pools.

For the underlying mechanics, see the Superfluid docs on distribution pools (GDA).