Skip to content

Add minimumDeposit and liquidationPeriod to the token list #11

Description

@kasparkallas

Why?
This information is necessary to build wrap/unwrap/send UI-s.

Solution
This is the query from Subgraph. If Token.governanceConfig === null then the default value from 0x0000000000000000000000000000000000000000 should be used.

query {
  tokenGovernanceConfig(id: "0x0000000000000000000000000000000000000000") {
    minimumDeposit
    liquidationPeriod
  }
  tokens {
    governanceConfig {
      liquidationPeriod
      minimumDeposit
    }
  }
}

I propose adding these values to the superTokenInfo extension in exactly the same shape.

Example:

{
  "address": "0x7cd00c2b9a78f270b897457ab070274e4a17de83",
  "name": "Super Dai Stablecoin",
  "symbol": "DAI.ex",
  "decimals": 18,
  "chainId": 43114,
  "extensions": {
    "superTokenInfo": {
      "type": "Wrapper",
      "underlyingTokenAddress": "0xd586e7f844cea2f87f50152665bcbc2c279d8d70",
      "minimumDeposit": "0",
      "liquidationPeriod": "14400"
    }
  },
  "logoURI": "https://raw.githubusercontent.com/superfluid-finance/assets/master/public/tokens/dai/icon.svg",
  "tags": ["supertoken"]
}

Notes
Maybe an RPC query is preferred over putting this in the token list.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions