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

Adapt Replicator agent for Safe usage #207

Open
gabrielfior opened this issue Apr 18, 2024 · 0 comments
Open

Adapt Replicator agent for Safe usage #207

gabrielfior opened this issue Apr 18, 2024 · 0 comments

Comments

@gabrielfior
Copy link
Contributor

Currently, the replicator agent (Terraform definition here) uses a private_key to execute transactions on-chain.
On #200 we added support for Safe, and the way to make an agent execute its transactions via its Safe is by adding the environment variable SAFE_ADDRESS to the runtime.
However, specifically in the replicator case, once we add the SAFE_ADDRESS, previous markets created by the replicator won't be accessed anymore, since creator will now be the safe_address instead of the public_key associated to the replicators private_key`. Hence there will be a transition period for the replicator agent.

We decided to split market creation from market solving - hence 2 steps:

  1. Create a new replicator agent (without a SAFE_ADDRESS but with the same private_key from the current replicator) that simply checks for markets created by it and solves them (removes funding, closes them, etc) however DOES NOT replicate new markets. Call this REPLICATOR_AGENT_EOA

  2. Refactor the replicator (with a SAFE_ADDRESS) so that the same logic is executed, but it uses the SAFE_ADDRESS as creator.
    In order to avoid re-replicating markets, it also checks if a market with that title already exists on Omen, and if so, does not create the market.
    Call this replicator REPLICATOR_AGENT_SAFE.

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