Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add minimumDeposit and liquidationPeriod to the token list #11

Open
kasparkallas opened this issue Jul 14, 2023 · 1 comment
Open

Add minimumDeposit and liquidationPeriod to the token list #11

kasparkallas opened this issue Jul 14, 2023 · 1 comment

Comments

@kasparkallas
Copy link
Contributor

kasparkallas commented Jul 14, 2023

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.

@vmichalik
Copy link
Contributor

I don't believe adding to the tokenlist would be viable, since governance updates won't automatically invoke a tokenlist update. unless you'd proposing we also add that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants