FluxFluxDocs
Launch App →

Payment Streams

Lock USDC in the Flux contract and release it linearly over time to a recipient. Used for payroll, contractor payments, token grants, and subscription billing.

Mechanics

When you create a stream, the full USDC amount is locked in the contract immediately. The recipient can withdraw their vested share at any time. The formula is:

vested = totalAmount × (currentTime - startTime) / (endTime - startTime)

Stream states

● ActiveStream is running. Recipient can withdraw vested amount anytime.
✓ FinishedEnd date passed. Recipient can withdraw full amount.
↓ WithdrawnRecipient has claimed all vested USDC.
✕ CancelledSender cancelled. Vested portion went to recipient; unvested returned to sender.

Creating a stream

Fill in: recipient address, total USDC amount, start date, end date. The preview shows duration and daily release rate. You sign two transactions: approve USDC, then create stream.

Withdrawing

Recipients enter the stream ID (visible in My Streams) and click Withdraw. The contract calculates exactly how much has vested and transfers it to the recipient's wallet instantly.

Cancelling

Only the stream creator can cancel. On cancel: the vested amount transfers to the recipient immediately, and the unvested amount returns to the sender. The stream ID becomes permanently cancelled.

Finding stream IDs

Go to Streams → My Streams tab. All streams you've created are listed with their ID, status, amount, and dates. IDs are assigned by the contract sequentially starting from 0.