For the complete documentation index, see llms.txt. This page is also available as Markdown.

How It Works

The full lifecycle of a dollar through Credit Coop — from depositor to vault to credit line to borrower, and back again through the Spigot.

This page walks the complete lifecycle end-to-end. Every step names the actual onchain action, so you can follow along in the contracts.

1. Depositors fund the vault

Capital enters through a Lending Vault, an ERC-4626 vault with asynchronous (ERC-7540) deposits and redemptions:

  1. A depositor calls requestDeposit() with the vault asset. If the vault is whitelist-gated, their address must be approved first.

  2. The Vault Curator processes the request (processDepositRequest()), locking in the share price within slippage bounds.

  3. The depositor claims their shares with deposit() — they now hold vault tokens whose value tracks the vault's sharePrice().

Redemptions mirror this: requestRedeem() → Curator processing → redeem() to claim assets. The two-step design lets the vault manage liquidity responsibly — capital may be deployed in credit lines and needs to be recalled in an orderly way.

While capital waits to be deployed into credit, the Liquid Strategy can park it in an approved external yield source (any ERC-4626 vault with the same base asset), so idle funds still earn.

2. The vault extends credit

The Credit Strategy acts on behalf of depositors. With capital from the vault, it proposes and funds positions on a borrower's Secured Line of Credit:

  1. Terms — amount, rate, deadline — are agreed by mutual consent: both the lender side and the borrower must sign the same proposal (addCredit()).

  2. Once accepted, the position is minted as an ERC-721 Credit Position Token held by the Credit Strategy. Positions are transferable (where permitted), which enables secondary liquidity for lenders.

  3. The borrower draws funds with borrow() — up to the committed amount, repay and redraw as needed. It's a revolver, not a term loan.

3. The Spigot secures repayment

Before (or as a condition of) funding, the borrower's revenue-generating contracts are transferred to the Spigot's ownership:

  • Each revenue contract is registered with addSpigot(), defining how tokens are claimed and how ownership transfers back.

  • Incoming revenue is escrowed and split automatically: the owner share accumulates toward debt service; the operator share is claimable by the borrower (claimOperatorTokens()) to run their business.

  • The borrower keeps operating their product through operate() — but only via functions explicitly whitelisted, so they can never redirect the cash flow or reclaim ownership while debt is outstanding.

  • Revenue arriving in other tokens can be converted before repayment — via market trade (tradeAndDistribute()) or a bounded OTC swap — so debt is always serviced in the credit token.

The Spigot supports multiple beneficiaries with defined allocations, so one secured cash flow can service more than one obligation with a transparent, programmatic waterfall.

4. Repayment flows back to depositors

Escrowed owner tokens are used to pay down interest and principal (claimAndRepay() and related flows). Interest accrues continuously per the agreed rate. Repayments flow to the Credit Strategy, increasing vault assets — which is what drives the vault share price, and thus depositor yield. Vault-level management and performance fees are taken per the disclosed fee schedule.

5. The line closes — or doesn't

A line's status is a state machine: ACTIVE while healthy, REPAID when fully closed out, LIQUIDATABLE if covenants are breached (missed deadline, collateral shortfall), and INSOLVENT or ABORTED in failure scenarios.

  • Happy path: the borrower repays in full (depositAndClose()), positions close, and the Spigot releases ownership of the revenue contracts back to the borrower automatically. The lien exists only as long as the debt does.

  • Distress path: if the line becomes liquidatable, the protocol's recovery tools activate — escrowed collateral can be liquidated, Spigot flows stepped up to full escrow for debt service, and positions impaired transparently if recovery falls short.

Go deeper

Last updated

Was this helpful?