clock-rotate-leftIntent Auto Matching

How Floe matches lender and borrower intents to create loans.

Overview

Intent matching is the core mechanism of Floe. Users create intents specifying their desired terms, and solvers (or users) match compatible pairs.

┌───────────────────────────────────────────────────────────────────────┐
│                        MATCHING FLOW                                   │
├───────────────────────────────────────────────────────────────────────┤
│                                                                        │
│   ┌────────────┐                              ┌────────────┐          │
│   │   Lender   │                              │  Borrower  │          │
│   │   Intent   │                              │   Intent   │          │
│   │            │                              │            │          │
│   │ • Amount   │     ┌────────────────┐       │ • Amount   │          │
│   │ • Min Rate │     │    MATCHER     │       │ • Max Rate │          │
│   │ • Max LTV  │────►│   (Solver)     │◄──────│ • Min LTV  │          │
│   │ • Duration │     │                │       │ • Duration │          │
│   │ • Expiry   │     │ Validates:     │       │ • Expiry   │          │
│   └────────────┘     │ • Compatibility│       └────────────┘          │
│                      │ • LTV gap      │                                │
│                      │ • Amounts      │                                │
│                      └───────┬────────┘                                │
│                              │                                         │
│                              ▼                                         │
│                      ┌────────────────┐                                │
│                      │     LOAN       │                                │
│                      │   Created      │                                │
│                      └────────────────┘                                │
│                                                                        │
└───────────────────────────────────────────────────────────────────────┘

Compatibility Rules

For two intents to match, ALL conditions must be true:

1. Same Market

Both intents must be for the same loan/collateral token pair:

2. Time Valid

Both intents must be within their validity period:

3. Duration Compatible

Borrower's duration must not exceed lender's maximum:

4. Rate Compatible

Borrower's max rate must meet lender's minimum:

The loan uses the borrower's max rate (most favorable to lender).

5. LTV Gap

Protocol requires 8% gap between origination LTV and liquidation LTV:

This ensures borrowers have buffer from liquidation at loan creation.

6. Amount Available

Lender must have sufficient remaining amount:

Matching Examples

Compatible Match

Incompatible: Rate Mismatch

Incompatible: LTV Gap

Fill Amounts

Full Fill

Entire borrow amount matched from a single lend intent:

Partial Fill (Lend Intent)

Lend intents with allowPartialFill = true can be matched multiple times:

Minimum Fill Enforcement

Loan Parameters Derivation

When a match occurs, loan parameters are derived from both intents:

Loan Parameter
Source

Principal

Fill amount

Collateral

Borrower's collateral (pro-rata if partial)

Interest Rate

Borrower's maxInterestRateBps

Origination LTV

Borrower's minLtvBps

Liquidation LTV

Lender's maxLtvBps

Duration

Borrower's duration

Start Time

Block timestamp

Matching Process

Onchain Matching

Token Flows

Solver Mechanics

How Solvers Work

  1. Monitor: Query indexer for open intents

  2. Find matches: Algorithm finds compatible pairs

  3. Prioritize: Rank by profitability (commission)

  4. Execute: Call matchLoanIntents on-chain

  5. Earn: Receive matcher commission

Competition

  • Multiple solvers compete to match intents

  • First to submit valid transaction wins

  • Gas price can determine winner in tight races

Manual Matching

Users can also match intents directly without solvers:

Via Web App

  1. Browse open intents on marketplace

  2. Click "Match" on compatible intent

  3. Sign transaction

  4. Receive loan (as borrower) or earn interest (as lender)

Intent Cancellation

Before Match

Users can cancel their pending intents:

Effects

  • Borrow cancellation: Collateral returned to borrower

  • Lend cancellation: USDC allowance remains (no transfer occurred)

Cannot Cancel

  • After intent is fully filled

  • During active loan (must repay instead)

Edge Cases

Race Conditions

Multiple matchers may try to match the same intent:

Partial Fill Race

Expiry During Match

Best Practices

For Borrowers

  1. Set competitive maxInterestRateBps for faster matching

  2. Include reasonable matcherCommissionBps (0.1-0.5%)

  3. Allow sufficient expiry time (7+ days)

For Lenders

  1. Set allowPartialFill = true for more matching opportunities

  2. Use reasonable minFillAmount (don't set too high)

  3. Competitive minInterestRateBps attracts more borrowers

For Solvers

  1. Monitor gas prices to ensure profitability

  2. Consider MEV protection for large matches

  3. Use efficient intent indexing

Next Steps

Last updated