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

Details about predictions #140

Open
kongzii opened this issue Nov 6, 2024 · 0 comments
Open

Details about predictions #140

kongzii opened this issue Nov 6, 2024 · 0 comments

Comments

@kongzii
Copy link
Contributor

kongzii commented Nov 6, 2024

Hey team,

we have a new contract 0x260E1077dEA98e738324A6cEfB0EE9A272eD471a and associated subgraph.

If you query the subgraph, you will get data like

{
  "data": {
    "predictionAddeds": [
      {
        "marketAddress": "0xfbf5e532d6e113725697799009f6cc78d069b921",
        "publisherAddress": "0xc81a11fc7a7908f1fc9120fe65470785faece02d",
        "estimatedProbabilityBps": 2000,
        "txHashes": [
          "0x8d3f8620afb80d6d0109d86c0b03b1cc28cff84137d33e12f846877a5e4c09a3"
        ]
        "ipfsHash": "0xe3f9ccd5bf173139ff9930d954da20939cb8189e76eb9048db685ea7ad050d26",
      }

Please note here that the contract itself doesn't check if the published prediction actually exists on Omen. We expect that paying fees to upload fake results isn't worth it, because in the end you can query this subgraph based on available markets on Omen (not the other way around) and then fake answers would be just ignored anyway.

The fields are:

marketAddress

The market ID/address this is for.

publisherAddress

Public key that published this prediction.

estimatedProbabilityBps

Probability in basic points for p_yes that agent predicted. 2000 is 20%.

Please note here that we are considering support of arbitrary categorical markets. Ie not just YES/NO markets. So theoretically this field could change to something more universal then only p_yes, if you can somehow account for that it'd be great but we will of course inform you if we would do such a breaking change.

txHashes

Each prediction can be associated with multiple trades on Omen. E.g. based on one prediction, agent can first sell his current positions and buy a new one.

In your history tab we can see that this is happening quite often, that's why txHashes is a list of hashes. You can use these hashes to match these predictions with trades.

Screenshot by Dropbox Capture

ipfsHash

IPFS file with more details. We store only most required stuff on contract (fields above). This file will contain additional details. Currently, it is JSON representation of this Pydantic model. So it will look like

{
  "agent_name": "PredictionProphetGPT4o",
  "reasoning": "Based on Google news X, Y, Z I predict that A will happen with P probability. Blah blah."
}

Please note that this file could change, please handle that agent_name or reasoning could be completely missing there or null or something. Also the whole ipfsHash could be missing and be just NULL_BYTES.

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

1 participant