Yield

The Yield API

The Yield API is used to leverage tokens in secondary DeFi markets and exchanges. For example, an NFT representing a municipal bond may be used as collateral and staked in an AMM. The endpoint for Yield alpha is https://instamint.network:5000. The Yield functionality collects data about major best-of-breed AMMs. Given that Instamint is infrastructure, it is agnostic to which AMM protocol it can stake to, however, Instamint currently stakes using Tinyman but this does not suggest Tinyman is the ideal protocol to stake to.

Currently, the above endpoint supports only the Algorand blockchain. The endpoint will be moved to https://api.instamint.com/yield in Q1 2023 when Ethereum support is added.

In addition to staking, Yield collects liquidity pool information from both Tinyman and Yieldly and tracks historical TVL.

Staking and Pool Creation

Using Yield, it is possible to stake a pair of NFTs with ALGOs as pairs and create a liquidity pool simultaneously. For example, a municipal bond NFT with an Net Present Value equal to 50,000 ALGOs is staked into a liquidity pool with 50,000 ALGOs. The liquidity pool is created using Tinyman.

Currently, Instamint supports the creation of a liquidity pool with an NFT and ALGOs and is experimenting with staking fractionalized NFTs and staking an NFT against other assets like USDC.

EndpointDescriptionOps Charge

/stake

Stake an NFT and ALGOs pair, create a new liquidity pool on Tinyman

50

The stake endpoint accepts two parameters, an Algorand asset ID and the quantity of ALGOs paired with the staking.

{
    "asset_1": 148817640,
    "qty_algo": 100
} 

If generation of the pool and staking of the assets is successful, information about the pool is returned and the pool is registered into Tinyman and is retrievable in the Console. A response will look the below, with the transaction ID.

{
  "confirmed-round": 26286300,
  "pool-error": "",
  "txid": "O35B624POTW7IYKILSMNHZPC2Q3BRNOTFXVVXXBVRRY3OI2UF5ZQ",
  "txn": {
    "sig": "t752y5mNBtzm13GXb6ipcSx6pDmbtLIA9bZzWQn5t7KDHUWEI+p4gRY12iS6WejA/qeVvf+64I6p7qF9+vfgCw==",
    "txn": {
      "amt": 2000,
      "fee": 1000,
      "fv": 26286298,
      "gen": "testnet-v1.0",
      "gh": "SGO1GKSzyE7IEPItTxCByw9x8FmnrCDexi9/cOUJOiI=",
      "grp": "So7ytVld/vYH60bEVt6vI/+4aqJPbQqnOqxIeW5V+Io=",
      "lv": 26287298,
      "note": "ZmVl",
      "rcv": "LTLU7A2YFXO2S6CHDENBUNS7LOHIOFVPTNN6M2IMHGY6PEA47XDDOHUIVA",
      "snd": "3O54CGNMCTKVBUZUGMHFBXN6WHJEWXKO47BEZ4H6MHOCIT26QLMV5T55WI",
      "type": "pay"
    }
  }
}

Staking via Console

Console allows users to select two assets that are minted and stake them into a new liquidity pool. This is possible in the Assets menu. To stake, select two assets that are minted and select Stake from the Action menu.

Historical TVL Data

Yield also collects liquidity pool information from Tinyman and Yieldly. If a pair of NFTs are staked into a liquidity pool, that pool information and its TVL is available in Console. Because valuations of NFTs and how pricing information is available, TVL for a pair of NFTs typically remain constant.

Note: Currently, support from the Yieldly team is limited and there is no testnet version of the protocol.

The Yield API provides access to the underlying DeFi protocols list of liquidity pols via the following APIs.

EndpointDescriptionOps Charge

/yieldly

Retrieve LPs from Yieldly

10

/tinyman

Retrieve LPs from Tinyman that belong to Instamint

10

Demo

In the below video, we go through the entire process of minting a token to staking it in Tinyman. The steps are the following:

  1. Mint the token via the Meta API. In the demo below, this is done via Postman

  2. Once the mint is complete, grab the Algorand Asset ID

  3. Call the Yield API with the Algorand Asset ID to stake it and a quantity of ALGOs

  4. Confirm on the Tinyman Dapp that the pool has been created and the NFT / ALGOs staked

  5. Confirm on Console under DeFi / Tinyman the pool has been created

Last updated