Skip to main content

Cross-Chain Swaps for NFTs

Introduction

In this use case, we explore a scenario involving a collection of NFTs organized into small groups. These NFTs can be swords, shields, or other in-game items. Each type of item has multiple copies (e.g., 100 swords of type X, 10 swords of type Y, etc.). The primary goal is to facilitate the movement of these tokens across different chains using a swap mechanism, with minting and burning as secondary operations.

Goals
  • Separate the roles of minter (security critical) from the role of market maker for cross chain swaps of NFTs
  • Allow for semi-trusted entities to act as market makers for cross-chain swaps
  • Restrict minting of NFTs to offline infrastructure, i.e. minting keys need not be connected to the Internet.

Use Case Overview

Organization of NFTs

Assume there is a set of NFTs categorized into small groups, for example:

  • Swords:
    • 100 of type X, 10 of type Y, and 3 of type Z
  • Shields:
    • 50 of type A, 10 of types B and C

Each category has more than one NFT, allowing us to retrofit the use case where token movement primarily relies on swaps and secondarily on minting and burning.

Role of the Market Maker

A set of NFTs is allocated to a market maker whose responsibility is to act as the counterparty for cross-chain swaps of NFTs. These NFTs allocated to the market maker are:

  • Shadow NFTs: Excess supply or pre-minted NFTs not permitted for use in the game.
  • PACT Secured: Ensuring these NFTs are immobilized is enforced through collateral in Coinweb, using a PACT smart contract.

Pre-minting tokens for the market maker limits the market makers ability to affect the game in case of a security breach of their infrastructure, simplifying the process by avoiding coding mint permissions into the L1 contract.

Redistribution Mechanism

From time to time, the distribution of NFTs on different chains should be adjusted to be aligned with where the market needs the NFTs to be. The market maker will typically end up with the NFTs on the "wrong chain", and the redistribution mechanism rectifies this by burning and minting the NFTs so they appear on the correct chain.

The redistribution mechanism involves a role separate from the market maker, the "minter."

  • Controlled by the Minter Role: The minter is responsible for the actual minting of NFTs, which can be performed offline. This role separation ensures that the critical minting keys are kept off-chain, enhancing security.

  • Market Maker as the Waiting Party: The market maker, rather than the end users, waits for NFTs to be minted. This separation allows for a controlled and secure redistribution process.

  • Burn and Mint: NFTs are burned on one chain and minted on another according to market demands.

  • Scheduled Intervals: The minting process is scheduled and not immediate like swaps. This scheduling could involve manual operations managed by the game company, ensuring that minting is conducted in a controlled environment.

This method ensures the minting process can be controlled and monitored, maintaining balance and security while allowing market makers to redistribute NFTs across various chains based on market demands.

Summary

This use case leverages pre-minted NFTs and scheduled redistribution to facilitate cross-chain swaps, ensuring that the movement of NFTs is efficient and secure without granting excessive minting capabilities to market makers.


Coinweb © 2024