NFT Lending Management with Gelato

Gelato Team

Feb 17, 2023

Summary

NFT Lending

NFTs have pushed blockchain technology into the mainstream, fueling web3 adoption across art, real estate, and gaming.

An NFT represents the digital ownership of an asset that can be traded. Recently, NFT lending has emerged as a new use case.


The Problem

In traditional lending, trust is required. Web3 promises “trustless” interactions. DeFi protocols enforce trust by requiring over-collateralization.

But for NFT lending, requiring collateral exceeding the NFT’s value is impractical.


Gelato enables collateral-free NFT lending, providing trust through automated executors that enforce NFT return when the lending period ends.

Exploring Solutions

NFT lending is often implemented by locking NFTs as collateral for loans, e.g., peer-to-peer (NFTfi) or peer-to-pool (BendDao).

Another model is NFT rentals, where the lender loans an NFT for a period in exchange for upfront payment.

Orium Network uses this model, lending Aavegotchis so borrowers can play the Aavegotchi game.

Orium Network Use Case

Aavegotchi is a community-owned NFT gaming protocol blending DeFi, NFTs, and gaming, with rewards via a “play-to-earn” model.

Orium Network acts as a “pet operator,” automating petting and lending of Aavegotchis using Gelato.

Automated petting tasks have benefited 60,000+ Aavegotchis. Check the proxy contract and implementation contract on Polygon for reference.


Lending Scheduler

Lending allows users to play without owning an Aavegotchi upfront.

Agreements include upfront costs, profit-sharing, and a 5% Orium fee.


Orium lending scheduler

Once the lending period ends, Gelato ensures the Aavegotchi is returned.

With Gelato and minimal code, Orium Network provides an innovative, valuable service for Aavegotchi gamers.

See the resolver contract.

Gelato Automate

Orium Network integrates Gelato Automate as follows:

  1. Wire-in Gelato Infrastructure

    Pass the Gelato address in the initializer:

    function initialize(address aavegotchiDiamondContract, uint256 max_number_aavegotchis, address gelatoAddress) public initializer {
      _gelatoAddress = gelatoAddress;
    }
  2. Funding Strategy

    Use the treasury contract to fund executions.

  3. Custom Logic – Lending logic:

    • Task creation: Done via the Gelato Automate UI.

    • Checker Condition: Resolver contract checks execution needs:

      function checker() external view returns (bool canExec, bytes memory execPayload) {
        IAavegotchiOperator aavegotchiOperator = IAavegotchiOperator(_aavegotchiOperatorAddress);
        (uint256[] memory tokenIds, address[] memory revokedAddresses) = aavegotchiOperator.listAavegotchisToPetAndAddressesToRemove();
        if (tokenIds.length > 0) {
          canExec = true;
          execPayload = abi.encodeWithSelector(IAavegotchiOperator.petAavegotchisAndRemoveRevoked.selector, tokenIds, revokedAddresses);
        } else {
          canExec = false;
          execPayload = bytes("No tokenIds to pet");
        }
      }
    • Executable function: `petAavegotchisAndRemoveRevoked`, restricted with `onlyGelato()`:

      function petAavegotchisAndRemoveRevoked(uint256[] calldata tokenIds, address[] calldata revokedAddresses) external onlyGelato {
        ...
      }

Conclusion

Web3 is building an internet of value. Orium Network shows how integrating Gelato services ensures reliable execution and automates NFT lending workflows.

About Gelato

Gelato is a Web3 Cloud Platform enabling automated, gasless, and off-chain-aware Layer 2 chains and smart contracts.

400+ projects use Gelato to power millions of DeFi, NFT, and gaming transactions.


  • Gelato RaaS: Deploy ZK or OP L2s with account abstraction and middleware baked in.

  • Web3 Functions: Connect smart contracts to off-chain data via decentralized cloud functions.

  • Automate: Execute smart contracts automatically in a reliable, decentralized manner.

  • Relay: Enable gasless transactions with a simple API.

  • Account Abstraction SDK: Built with Safe, combining gasless txs with secure smart wallets.

Subscribe to our newsletter and turn on

Twitter notifications for the latest Gelato news!
Interested in building the future of Web3? Apply here.


Resources

Ready to build?

Start with a testnet, launch your mainnet in days, and scale with industry-leading UX.

Ready to build?

Start with a testnet, launch your mainnet in days, and scale with industry-leading UX.

Ready to build?

Start with a testnet, launch your mainnet in days, and scale with industry-leading UX.

Ready to build?

Start with a testnet, launch your mainnet in days, and scale with industry-leading UX.