1Hive / honeyswap

Documentation on Honeyswap
19 stars 14 forks source link

Set up a metadata API for the farm deposit ERC721 tokens #119

Open ceresbzns opened 3 years ago

ceresbzns commented 3 years ago

The Problem

This task is extremely important as without this API farmers will have a hard time differentiating deposit NFTs for trading on platforms like opensea. This is how one of our deposit NFT's asset page currently looks like on opensea: 2021-07-02-114423_1625x862_scrot.png This is how every deposit looks like. So right now it's impossible for anyone to know what the deposit actually is unless they manually query the data on polygonscan

Separate parts to this task:

  1. [BACKEND] Create an API endpoint that takes in the depositID (token ID) of a farm deposit and returns a JSON of metadata according to opensea's metadata specification. The endpoint should directly accept the tokenID in the URL. An example of a URL: 1hive.io/metadata/polygon/420 where 420 (lmao) is the deposit ID, this is necessary because platforms like opensea first query the contract and it generates the individual token URLs by taking a base URL (in our example it would be "1hive.io/metadata/polygon/") and just tacks on the deposit ID.
  2. [BACKEND] The endpoint should return information for every deposit like:
    • the description
    • whether the token was already redeemed
    • what LP token is being staked (underlying tokens, link to honeyswap info page, dollar value)
    • whether it's locked
    • if locked, at what time it unlocks
  3. [DESIGN] Create a nice image possibly a template that accepts the different LP tokens that can be provided along with the endpoint to be displayed in NFT marketplaces like opensea. Like this others and farmers themselves will easily be able to recognize their deposits in their profiles.
  4. [GOVERNANCE] Once the endpoint is created create an action in the aragon organization to set the base URL in the farm.
ceresbzns commented 3 years ago

We need a code review for this - who can we get?

ceresbzns commented 3 years ago

@felixbbertrand is going to review

fbgoat commented 3 years ago

LGTM! @hernandoagf