Skip to content

Unlockd & The Lockeys

Unlockd was a collateralized lending protocol that allowed users to deposit NFTs as collateral and borrow tokens such as ETH or BTC. The key innovation of the protocol was its valuation system: instead of relying on the floor price of an NFT collection, it aimed to estimate the individual market value of each NFT used as collateral.

This approach allowed users to retain ownership of their NFTs and continue benefiting from their associated perks while accessing liquidity.

The protocol was built on the Ethereum network. It was successfully launched and operated for a period of time, but later suffered a hack that significantly damaged its reputation. As a result, the project was eventually discontinued.

The team behind the brand is currently pursuing a new direction focused on real estate tokenization. The Lockeys was an NFT collection launched within the Unlockd ecosystem—a collection of 3,500 pixel-art NFTs representing different roles within the protocol.

  • Ethereum
  • Solidity
  • Hardhat
  • Foundry
  • OpenZeppelin
  • Next.js
  • React
  • TypeScript
  • TailwindCSS
  • Viem (The Lockeys)
  • Custom state management library based on localStorage
  • Internal error-handling library for frontend applications
  • Internal wrapper library around ethers.js to standardize contract interactions
  • Node.js
  • Express
  • TypeScript
  • Prisma
  • Service API for data processing, caching, and frontend consumption
  • The Graph (subgraph)
  • MariaDB (database)
  • MongoDB (database)
  • HeidiSQL (database management)
  • AWS
  • Vercel
  • GitHub
  • GitHub Actions (CI/CD)

Unlockd followed a primarily on-chain architecture, where smart contracts handled the core protocol logic, including collateral management, loan issuance, interest accounting, and NFT liquidations.

Users interacted with the protocol through a web application connected to their wallets. The frontend executed transactions directly on-chain while presenting protocol state and user positions using indexed blockchain data.

flowchart TB
    U[User / wallet]
    F[Web application]

    U <-->|Wallet connection| F
    F <-->|Transactions & read state| PC

    subgraph Ethereum [Ethereum network]
        subgraph Unlockd
            PC[Protocol contracts]
            PC <--> CM[Collateral module]
            PC <--> LM[Lending module]
            PC <--> IM[Interest module]
            PC <--> LQ[Liquidation module]
        end
        OR[Oracles and third-party services]
        OR -->|On-chain data| PC
    end

To support the frontend, the system included a service API responsible for processing and caching data. This API aggregated information from multiple sources, including indexed blockchain data, the internal database, and external services.

The frontend consumed data from both the API and the indexing layer to efficiently power dashboards, portfolio views, and protocol activity.

flowchart LR
    subgraph Sources
        BC[Blockchain data]
        DB[(Internal DB)]
        EXT[External third-party services]
    end

    API[Service API]
    IDX[Indexing layer]
    FE[Frontend]

    BC <--> API
    DB <--> API
    EXT --> API
    BC --> IDX

    API --> FE
    IDX --> FE

Liquidations were managed through a monitoring bot that continuously evaluated loan health and triggered liquidation transactions for unsafe positions.

In addition to the automated system, the protocol exposed a public liquidation interface that allowed any user to execute liquidations directly through the application.

flowchart LR

    User[User / liquidator]
    App[Web application]

    Bot[Liquidation bot]

    subgraph Ethereum network
        Contracts[Protocol contracts]
    end

    User --> |Use app| App
    App --> |Execute transaction| Contracts

    Contracts --> |Monitor positions| Bot
    Bot --> |Trigger liquidation| Contracts

The Lockeys followed a simpler architecture. It was implemented as a monolithic web application that interacted directly with the smart contracts while reusing parts of the frontend infrastructure developed for Unlockd.

flowchart LR

    User[User / wallet]

    subgraph The Lockeys
        App[Monolithic web application]
    end

    subgraph Ethereum network
        Contracts[NFT smart contracts]
    end

    User --> App
    App -->|Transactions| Contracts
    App <-->|Read State| Contracts

I participated in selecting the frontend and backend tools. As the team was relatively small and early in its experience building new platforms, I proposed bringing in an external senior frontend advisor to help validate the technology stack. Together, we defined the initial architecture for the web application and supporting services, ensuring rapid development while keeping the system maintainable for a small and young team.

Together with the UX/UI designer, I independently developed the initial version of The Lockeys, implementing the monolithic web application for NFT purchases. This work ran in parallel with early iterations of the Unlockd MVP, laying the foundation for both projects.

As MVP requirements became clearer, I helped expand the frontend team by participating in hiring additional developers. I coordinated closely with the product designer to create Figma designs that matched available data and technical constraints. At the same time, I worked with the smart contract team to ensure proper integration with peripheral contracts, subgraphs, and partner APIs so that all necessary data was accessible.

I defined the frontend architecture and implemented internal libraries to standardize and simplify development, including:

  • A custom state management library based on localStorage
  • A reusable frontend error handling library
  • A wrapper around ethers.js for standardized smart contract interactions

During this phase, the team used mock data to build components, implement flows, and validate designs while the backend, contracts, subgraph, and API matured.

I led the implementation of the web application’s data layer, deciding which data would come from the subgraph versus the API and standardizing formats for the frontend. I collaborated with the designer and smart contract team to ensure the interface presented all necessary data consistently.

Sep 17, 2022


Sep 17, 2022