The Spigot
A groundbreaking innovation for the onchain financial ecosystem.
The Spigot is a smart contract that governs the secure escrow and splitting of onchain cash flows between multiple parties according to an agreed set of terms — and enforces those terms in code.
Its core purpose is Trustless Recourse: if the obliged party (a Borrower) fails to meet its obligations, the counterparties' claim over the Borrower's cash flows is enforced programmatically, at the source, without requiring cooperation or court action.
How it works
The Borrower attaches one or more Revenue Contracts — smart contracts it owns that receive payment flows — to the Spigot, transferring their ownership to the Spigot for the duration of the facility.
Each Revenue Contract has an agreed owner split (0–100%): the escrowed share flows to the Spigot's beneficiaries; the remainder is claimable by the Borrower through the Operator role.
The Borrower keeps operating its business normally: the Operator can call whitelisted functions on the Revenue Contracts — but never the claim or ownership-transfer functions.
Escrowed tokens repay the facility (directly, or after conversion via DEX or consented OTC swap), or are held as Reserves.
On full repayment, ownership of the Revenue Contracts returns to the Borrower. On default, the facility's share can step up to 100%.
A multi-beneficiary payment waterfall
The v2 Spigot serves more than one creditor. Alongside the Line of Credit (the default beneficiary), the Spigot can be configured with additional third-party beneficiaries — for example other lenders to the same Borrower — each with:
Its own allocation of escrowed cash flows
Its own credit token, pool address, and repayment function, so the Spigot can repay that creditor onchain directly
Live onchain debt tracking — the Spigot queries each beneficiary's pool for the debt outstanding and can never overpay it
Escrowed revenue that isn't in a beneficiary's credit token is converted — by DEX trade or consented OTC swap — before repayment. When a beneficiary is fully repaid, its residual tokens are reassigned to the default beneficiary, and its allocation is implicitly redistributed. In emergencies, the Admin can impair (void) a beneficiary's recorded debt or recover tokens on a beneficiary's behalf.
This makes the Spigot a general-purpose, onchain settlement waterfall: one revenue source, multiple creditors, deterministic priority and accounting.
Additional properties
ETH handling — any native ETH received is automatically wrapped to WETH so it can be escrowed and distributed like any ERC-20
Anyone can trigger claims through the permitted roles' functions; all balances and splits are publicly auditable in real time
Continuity — a configured Spigot survives the facility it secured and can be reused for the Borrower's next facility
Last updated
Was this helpful?