Skip to content

Payroll ​

Distribute a streamed allocation among fixed recipients.

mermaid
flowchart LR
    S[Stream] --> W{Actionless branch}
    W --> A[Transfer 60%]
    W --> B[Transfer 30%]
    W --> C[Transfer 10%]

Use a Stream budget, Weight Splitter and one Transfer clone per recipient. The root has no action, so it needs at least two children.

Weights [600000, 300000, 100000] divide 1,000 raw units into 600, 300 and 100. Fund the DAO.sol contract and sync the budget, then let an authorized caller run plugin.trigger("", new bytes[](0)). This Solidity expression assumes plugin is the installed CapitalTreePlugin.

The recipe permits anyone to trigger. It distributes whatever has accrued, not a fixed monthly payment, and resets the stream after success. A failed recipient transfer rolls back all payments. Small allocations can round a child to zero and revert. Restrict timing through permissions if the payroll policy needs a specific execution window.

Configure and install ​

Use Recipes.payroll and the configuration example. Follow setup and permissions to install the flow. Replace addresses and choose amounts in each token's smallest unit.

Component source: StreamBudget.sol · WeightSplitter.sol · TransferAction.sol.

All examples.