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

published.priceFeed.ATOM_USD_price_feed has very little resolution #5979

Closed
dckc opened this issue Aug 17, 2022 · 0 comments · Fixed by #5982
Closed

published.priceFeed.ATOM_USD_price_feed has very little resolution #5979

dckc opened this issue Aug 17, 2022 · 0 comments · Fixed by #5982
Assignees
Labels
bug Something isn't working Inter-protocol Overarching Inter Protocol oracle Related to on-chain oracles. Zoe package: Zoe

Comments

@dckc
Copy link
Member

dckc commented Aug 17, 2022

Describe the bug

We set a price was set using E(history[0]).pushResult('19.37') but the ratio we got via RPC is 19 USD to 1 ATOM. Is it using a unit price of 10^-6 ATOM rather than 1 ATOM?

originally discussed in #5375 (comment)

To Reproduce

published.priceFeed.ATOM_USD_price_feed
$ ~/go/bin/agd --node=https://xnet.rpc.agoric.net:443 query vstorage data published.priceFeed.ATOM_USD_price_feed -o json | jq '.value | fromjson | {body: .body | fromjson, slots}'
{
  "body": {
    "quoteAmount": {
      "brand": {
        "@qclass": "slot",
        "iface": "Alleged: quote brand",
        "index": 0
      },
      "value": [
        {
          "amountIn": {
            "brand": {
              "@qclass": "slot",
              "iface": "Alleged: ATOM brand",
              "index": 1
            },
            "value": {
              "@qclass": "bigint",
              "digits": "1"
            }
          },
          "amountOut": {
            "brand": {
              "@qclass": "slot",
              "iface": "Alleged: USD brand",
              "index": 2
            },
            "value": {
              "@qclass": "bigint",
              "digits": "19"
            }
          },
          "timer": {
            "@qclass": "slot",
            "iface": "Alleged: timerService",
            "index": 3
          },
          "timestamp": {
            "@qclass": "bigint",
            "digits": "1660695302"
          }
        }
      ]
    },
    "quotePayment": {
      "@qclass": "slot",
      "iface": "Alleged: quote payment",
      "index": 4
    }
  },
  "slots": [
    null,
    "board02810",
    "board0639",
    null,
    null
  ]
}

Expected behavior

The reported ratio should be 19370000 uist to 1000000 uatom.

Platform Environment

@dckc dckc added bug Something isn't working Zoe package: Zoe Inter-protocol Overarching Inter Protocol oracle Related to on-chain oracles. labels Aug 17, 2022
@mergify mergify bot closed this as completed in #5982 Aug 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Inter-protocol Overarching Inter Protocol oracle Related to on-chain oracles. Zoe package: Zoe
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants