FOIL
Devnet Livev1.0

FOIL Documentation

Learn how FOIL enables NFT-backed lending on Solana, allowing collectors to access liquidity without selling their prized trading cards.

Introduction

FOIL is a DeFi lending protocol built on Solana that enables users to borrow against NFT trading cards while allowing lenders to earn yields on loans backed by verified collectible assets.

Our Mission

We believe collectors should never have to choose between holding their prized cards and accessing the capital they need. FOIL bridges this gap by creating a trustless lending market for NFT trading cards.

For Borrowers

Access liquidity without selling your collection. Use your verified trading cards as collateral and get USDC loans up to 70% of the insured value.

For Lenders

Earn yields on loans backed by insured, verified collectible assets. Your capital is protected by real-world valued NFTs held in escrow.

How It Works

The FOIL protocol follows a straightforward loan lifecycle from request to completion.

Loan Flow
// Loan Creation Flow
1. Borrower selects NFT from wallet
2. Platform verifies NFT against supported collections
3. Insured value determines max loan (70% LTV)
4. NFT transferred to secure escrow
5. Loan request visible to lenders
Typical loan durations: 30, 90, or 180 days

Technical Overview

FOIL is built on modern blockchain infrastructure designed for speed, low costs, and robust NFT support.

Why Solana?

Speed

400ms block times enable near-instant transaction confirmations, making the lending experience feel seamless.

Low Cost

Transaction fees are fractions of a cent, making micro-loans economically viable and reducing barriers to entry.

NFT Infrastructure

Native Metaplex standard provides robust metadata handling and creator verification built into the ecosystem.

Architecture

FOIL consists of three main layers working together:

Frontend

Next.js application with TypeScript, providing a responsive interface for managing loans, viewing NFTs, and connecting wallets.

Wallet Integration

Solana Wallet Adapter supporting Phantom, Solflare, Backpack, and other popular wallets for secure transaction signing.

Smart Contract

Anchor Framework program handling escrow, loan management, and position trading with on-chain security guarantees.

NFT Verification

Every NFT submitted as collateral is verified against our registry of supported collections using Metaplex metadata.

Verification Process
// NFT Collection Verification
function verifyNFT(nft_metadata):
  for collection in supported_collections:
    for creator in nft_metadata.creators:
      if creator.address == collection.creator
         AND creator.verified:
        return { valid: true, collection }
  return { valid: false }

Only NFTs from verified creators in supported collections can be used as loan collateral, ensuring asset authenticity.

Smart Contract Overview

The FOIL smart contract manages the entire loan lifecycle with on-chain security guarantees.

Account Structures

The protocol uses four primary account types to track state:

Config

Global program configuration including treasury address, fee rates, supported collections, and operational parameters.

LoanRequest

Individual loan proposals with terms (amount, rate, duration), NFT details, insured value, and current status.

ActiveLoan

Funded loans tracking principal, interest accrued, repayment progress, due dates, and escrow details.

LoanPosition

Enables secondary market trading of loan positions, tracking current holder and listing status.

Loan Lifecycle

Loans progress through defined states from creation to completion:

State Machine
// Loan State Machine
RequestStatus:
  Open        -> NFT with borrower
  EscrowReady -> NFT in escrow, awaiting funding
  Funded      -> Loan active
  Cancelled   -> Borrower cancelled
  Expired     -> Request timed out

LoanStatus:
  Active      -> Repayment pending
  Repaid      -> NFT returned to borrower
  Defaulted   -> NFT claimable by lender
Borrower can cancel anytime before funding
NFT returned automatically on full repayment
72-hour grace period after due date

Security Features

The protocol implements multiple layers of security to protect users:

70%

Maximum LTV

Loans capped at 70% of insured value for lender protection

72h

Grace Period

Borrowers get 72 hours after due date before NFT can be claimed

Secure Escrow

NFTs held in PDA-controlled escrow until loan completion

Creator Verification

On-chain verification of NFT authenticity via Metaplex metadata

Roadmap

FOIL is currently live on Solana Devnet with mainnet launch planned after security audit completion.

Current Status

Devnet Live

The full protocol is deployed and operational on Solana Devnet. Test with mock USDC and TestFoils NFT collection.

Complete loan lifecycle implementation
Multi-collection support with dynamic registry
NFT creator verification
Secondary market for loan positions
Emergency pause functionality

Mainnet Plans

Before mainnet launch, several key milestones must be completed:

External Security Audit

Required before mainnet deployment. Third-party audit of smart contract and frontend code.

Collector Crypt Integration

Partnership with Collector Crypt for verified insured values on graded Pokemon and MTG trading cards.

Oracle Integration

Automated price feeds for collection floor prices to enable instant insured value verification.

Reputation System

On-chain reputation tracking for borrowers and lenders to enable better loan matching and rates.

Stay updated: Follow our progress on X (Twitter) for the latest announcements on mainnet launch and new feature releases.

Last updated: January 2026

Launch App