Balmy
DCA
DCA
  • Introduction to the protocol
  • FAQ
  • Concepts
    • Positions
      • Actions
      • NFT/Permissions
      • Swap Intervals
    • Fees
    • Swaps
    • Token Integration
    • Yield Sources
  • Architecture
    • Core
      • Hub
      • Permission Manager
      • NFT Descriptor
    • Periphery
      • Companion
      • Libraries
  • Tech Guides
    • Interacting with the protocol
    • Smart Contract Registry
    • Swaps
      • Next Swap
      • Executing a Flash Swap
    • Position Management
      • Creating a Position
      • Modifying a Position
      • Withdrawing from a Position
      • Terminating a Position
    • Permission Management
    • Subgraphs
      • Playground
      • Fetch all pairs
      • Fetch all tokens
      • Fetch all active intervals
      • Fetch positions by address
    • Github
  • Mean explained by friends
    • By Perpetual Protocol
    • By Ceazor's Snack Sandwich
  • Other
    • Bug Reports
Powered by GitBook
On this page

Was this helpful?

  1. Architecture
  2. Core

NFT Descriptor

PreviousPermission ManagerNextPeriphery

Last updated 2 years ago

Was this helpful?

As we explained , the metadata + image of the position NFT is fully on-chain. There is a contract that, given a position id, returns a string with the ERC721 metadata JSON. This JSON also contains a SVG (also as a base64 string) that displays the information about the position, such as:

  • Position Id

  • Available for withdraw

  • Swapped since last modification / withdraw

  • Remaining

  • Position rate

We call the contract responsible for this work "NFT Descriptor". Since all of this work is performed on-chain, there is no need for external servers or IPFS.

This on-chain SVG approach approach is based on Uniswap's v3 NFT positions.

before
base64