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

Arbitrage Agent #137

Open
evangriffiths opened this issue May 3, 2024 · 5 comments · May be fixed by #511
Open

Arbitrage Agent #137

evangriffiths opened this issue May 3, 2024 · 5 comments · May be fixed by #511
Assignees

Comments

@evangriffiths
Copy link
Contributor

Create an agent that doesn't make predictions based on research, but instead looks for arbitrage opportunities (2 +ve/-vely correlated markets with differntly correlated market p_yes values).

@gabrielfior
Copy link
Contributor

One way to implement this would be to
-> Find pair of markets that present very high abs correlation (e.g. "Trump will be president in 2024", "Biden ... 2024")
-> If abs(p_yes_trump - p_no_Biden) > threshold, do action

We should then define 1. threshold and 2. action.
-> For threshold, we should probably investigate a few examples.
-> For action, could you comment on the optimal ways to act in such markets?

@gabrielfior
Copy link
Contributor

My suggestion for implementation:
-> Fetch markets from polymarket using their new API (note that gnosis/prediction-market-agent-tooling#459 is a larger task which will be partially but not fully tackled here)
-> The markets above contain only title, description (all are open since we want current prices), volume, outcomes and outcomePrices.
-> Use Langchain's InMemoryVectorStore to find markets that more closely match a given question. Pick top-K.
-> We pass the top-K markets (title, outcomePrices, outcomes) to an LLM and ask for it for an estimate. We ask that it considers markets with higher volume as having a higher likelihood to be correct.
-> We then place a bet based on this probability.
-> We should also test out a few markets, e.g. US election, Elon, etc.

@kongzii
Copy link
Contributor

kongzii commented Oct 4, 2024

My suggestion for implementation:

Isn't that exactly what Think Thoroughly is doing already? Except TT is fetching markets from Omen itself. It seems like if we add a new flag to the TT agent to only use the correlated markets, this task is done.

Or maybe TT's get_correlated_markets could be upgraded to also fetch from Polymarket (and when we are at it, why not Manifold as well?)

@gabrielfior
Copy link
Contributor

It seems like if we add a new flag to the TT agent to only use the correlated markets, this task is done.

Indeed TT can be used - so this agent could inherit from that and cast a new prediction based only on markets and not scenarios.
@evangriffiths any thoughts?

@evangriffiths
Copy link
Contributor Author

evangriffiths commented Oct 4, 2024

From my understanding of arbitrage (I didn't really know what it was before entering the crypto world 😅), what you're describing here isn't it.

Arbitrage is the practice of buying and selling the same or similar asset in different markets to profit from price differences... Arbitrage can be beneficial because it can lead to riskless profits...

What you're proposing seems to be "using similar markets to inform the prediction for another market, so we can make a more accurate prediction", which I think is different.

o1 is smarter than me so it can explain it with a simple example:

Screenshot 2024-10-04 at 13 37 28 Screenshot 2024-10-04 at 13 38 09

So the task would just be finding such cases of these markets. To start, this could be simply on the same platform (i.e. both A and B are on Omen/Polymarket. But in the future we could look for arbitrage opportunities across platforms (A is on Omen, B is on Polymarket, and the agent has to bridge tokens/have 2 wallets)

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 a pull request may close this issue.

3 participants