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

Collateral Operations

Features for managing asset collateral that the parties may agree is also required to secure a line

Asset collateral for a Line of Credit is held in a dedicated Escrow contract owned by the Line. The Escrow prices collateral by oracle and enforces the facility's minimum collateral ratio.

Supported collateral & enabling

Three collateral classes are supported:

  • ERC-20 tokens

  • ERC-4626 vault tokens

  • Uniswap V3 liquidity positions (NFTs)

Every collateral token must be enabled by the Admin before it counts toward the Collateral Ratio — this whitelist protects Lenders from malicious tokens and denial-of-service attacks. Once enabled, a token cannot be disabled. For Uniswap V3 positions, the Admin enables the token pair (and fee tier); both underlying tokens must be individually enabled and priceable by oracle.

Adding collateral

Anyone can deposit enabled tokens as collateral at any time; the Collateral Ratio updates immediately. Uniswap V3 positions are added by depositing the position NFT.

Collateral Ratio

The ratio of the oracle value of all escrowed collateral (ERC-20/4626 balances plus the value of Uniswap V3 positions) to the facility's Total Outstanding Debt (principal + accrued interest, valued in USD). If debt is zero the ratio is treated as infinite.

If the ratio falls below the facility's minimum, the Line becomes LIQUIDATABLE.

Withdrawing collateral

The Borrower (or Admin/Servicer on their behalf) can release collateral at any time provided the minimum Collateral Ratio is maintained after the release. Once the facility is REPAID, the ratio check is waived and the Borrower can withdraw everything. Uniswap V3 positions are released the same way.

Managing Uniswap V3 collateral

Escrowed Uniswap V3 positions remain productive. A designated Uniswap V3 Manager role can mint new positions, increase or decrease liquidity, and collect trading fees on escrowed positions — every operation is followed by an automatic Collateral Ratio check. The Borrower can burn a position (or anyone via the Servicer if the Line is LIQUIDATABLE).

Operating with escrowed collateral (registered contracts)

The Admin can register external contracts and whitelist specific functions on them (e.g. staking, wrapping, swapping). The Borrower or Admin can then call those whitelisted functions with escrowed assets via the Escrow's operate mechanism. After every operation the Escrow re-syncs its accounting and enforces the minimum Collateral Ratio — collateral can be put to work, but never in a way that leaves the facility under-collateralized.

OTC swaps of collateral

Escrowed collateral can be swapped for assets of equal value directly with a counterparty, by mutual consent of the Admin and that counterparty. Whitelisted stablecoins swap one-to-one; other assets are priced by oracle with a maximum allowed price impact (set by mutual consent of Admin and Borrower). A swap fee, where configured, is taken from proceeds. The minimum Collateral Ratio is enforced after every swap.

Updating the minimum Collateral Ratio

The Borrower can update the facility's minimum Collateral Ratio, but only when the facility has no open Credit Positions and no outstanding obligations — the change clears any open proposals and increments the facility nonce, so no Lender can be bound to collateral terms they didn't sign.

Liquidation and recovery
  • If the Line is LIQUIDATABLE, the Admin is programmatically permitted to liquidate escrowed collateral (including Uniswap V3 positions) on behalf of Lenders.

  • If the Line is ABORTED (emergency state, only on facilities with recovery enabled), the Admin can recover escrowed tokens and positions for orderly resolution.

See Credit Events.

Last updated

Was this helpful?