# Cartridge Lending Protocol

*Explaining the flow and required contracts for lending cartridges.*

By [hangingInThere](https://paragraph.com/@token0verlord) · 2025-07-09

---

REQUIRED FACTORIES
------------------

#### 1\. `EscrowFactory.sol`

*   Deploys individual escrow contracts per borrowing event.
    
*   Keeps registry of all deployed escrows
    

* * *

#### 2\. `SBTFactory.sol`

*   Deploys SBT contracts for each game
    

* * *

#### 3\. `BurnSBT.sol`

*   Separate logic handler for burning SBTs + triggering XP/badge
    
*   Or this could just be a function in the SBT contract itself
    
*   Emits event like: `BurnedSBT(address user, uint256 gameId, uint256 xp)`
    

* * *

LENDER SIDE — “Supply the Cartridge”
------------------------------------

Goal:
-----

Earn ETH by lending out owned game NFTs

#### Steps:

1.  Connect wallet (check for owned game NFTs)
    
2.  List a game via `LendingEscrow`:
    
    *   Choose game NFT (contract + tokenId)
        
    *   Set **price to borrow** (e.g. `0.01 ETH`)
        
    *   Set **duration** (e.g. `3 days`)
        
3.  Game NFT is **transferred into escrow**
    
4.  Game appears as **“available to borrow”** on the frontend
    
5.  When borrowed:
    
    *   Receives ETH from borrower
        
    *   Activity is shown on lender’s profile
        
6.  When returned:
    
    *   Game NFT is **sent back to lender**
        

* * *

BORROWER SIDE — “Rent a Cartridge”
----------------------------------

#### Goal:

Borrow a game, play it, and earn XP

#### Steps:

1.  Connect wallet
    
2.  Browse available games
    
3.  Click **“Borrow for 0.01 ETH”**
    
4.  Pays price → Escrow contract
    
5.  Receives a **Soulbound NFT (SBT)**:
    
    *   Contains game ID, timestamp, expiration
        
    *   (what will this NFT look like?)
        
6.  Game is now **"checked out"**
    
7.  When done:
    
    *   Clicks **“Return Game”** or lets it expire
        
    *   **SBT is burned**
        
    *   **XP gained.**

---

*Originally published on [hangingInThere](https://paragraph.com/@token0verlord/clp)*
