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

[WIP]: Polymarket support #195

Draft
wants to merge 21 commits into
base: main
Choose a base branch
from
Draft

[WIP]: Polymarket support #195

wants to merge 21 commits into from

Conversation

jmoreira-valory
Copy link
Collaborator

Polymarket support

@Adamantios Adamantios changed the title Polymarket support [WIP]: Polymarket support Jan 4, 2024
@Adamantios Adamantios marked this pull request as draft January 4, 2024 14:47
jmoreira-valory and others added 13 commits January 4, 2024 20:06
# Conflicts:
#	packages/packages.json
#	packages/valory/agents/trader/aea-config.yaml
#	packages/valory/services/trader/service.yaml
#	packages/valory/skills/decision_maker_abci/behaviours/sampling.py
#	packages/valory/skills/decision_maker_abci/skill.yaml
#	packages/valory/skills/market_manager_abci/skill.yaml
#	packages/valory/skills/trader_abci/skill.yaml
#	packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml
# get only bets that close in the next 48 hours
# get only bets that close in the next `sample_bets_closing_days`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The sample_bets_closing_days override can be set to a large value to test kelly for Polymarket.

Comment on lines +184 to +185
# TODO: we ignore 'creators' and simply fetch 100 latest markets.
query = questions_polymarket_gamma.substitute(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pending TODO.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add
AND created_by=$creator

to the "where:" query parameter on polymarket_gamma query

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It cannot be addressed this way since we do not know the creators in advance. Instead, fetching all the markets and adding pagination might make more sense.

}

return cls(
collateralToken=USDC,
Copy link
Collaborator

@Adamantios Adamantios Jan 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: make sure collateralToken is not used when making a request to the mech, but xdai or wxdai is used.

Note: we need to interact with both gnosis and polygon chains for Polymarket.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you need to interact with both chains?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To interact with the mech on Gnosis. Is the mech deployed on Polygon?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will deploy it on Polygon eventually. For testing use it on Gnosis

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is only for testing then it would be faster to test this by mocking the mech request-response part locally and keep the code unchanged for when the mech is deployed on Polygon.

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

Successfully merging this pull request may close these issues.

3 participants