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

Passive Mode Agent #2012

Open
fredo opened this issue Jul 4, 2023 · 5 comments
Open

Passive Mode Agent #2012

fredo opened this issue Jul 4, 2023 · 5 comments

Comments

@fredo
Copy link
Contributor

fredo commented Jul 4, 2023

Cerated out of #1757

Recent events have shown that the agent needs to be able to run in a safe mode where it maintains the current position but does not engage in new positions.
The main reason for it is, that the agent is required to have a certain amount of ETH to function properly. But currently the agent is designed to only spend ETH, eventually depleting its ETH funds.

With the minimum source balance, an LP could already mitigate entering new positions but I consider this more of a hack.

Passive Mode

I see the spec of the passive mode as follows:

  • Don't fill any new requests
  • Continue to run the agent
  • Claim/Challenge/withdraw should be executed like in the normal mode
  • Agent should not enter new challenges
  • Agent should log if their are no outstanding transactions anymore and exit
  • If Agent starts in passive mode and there are no outstanding transactions sam as the above
  • Flag in the config to enable passive mode
  • Should ignore the whitelist check

Also, add documentation for some scenarios e.g. agent just wants to shut down the agent for a certain time or wants to exit the system etc.

@istankovic
Copy link
Contributor

istankovic commented Jul 4, 2023

Agent should not enter new challenges

This is just for other agents' claims, right?

I think it would be helpful to be more specific here. I can think of at least these situations (feel free to add more!):

  • a new challenge arrives for a claim made by the agent
  • a new challenge arrives for a claim not made by the agent
  • next turn of a challenge game in which the agent participates
  • next turn of a challenge game in which the agent does not participate

Please check those cases where you think a passive-mode agent should take action.

@istankovic
Copy link
Contributor

Should ignore the whitelist check

What does this mean?

@fredo
Copy link
Contributor Author

fredo commented Jul 4, 2023

next turn of a challenge game in which the agent does not participate

Nothing happens here even in the normal mode

@fredo
Copy link
Contributor Author

fredo commented Jul 4, 2023

Should ignore the whitelist check

What does this mean?

The Agent should not crash if he is not whitelisted

@fredo
Copy link
Contributor Author

fredo commented Jul 4, 2023

I don't think that it makes a lot of sense to list all possible situations, rather I'd like to extend on the invariants.
The goal of this mode is to successfully exit the system. In a bit more detail this means that the agent has no stake/tokens whatsoever in the contracts anymore. In order to achieve this state, the agent should not enter new positions.

  • There should be a deterministic end of this mode. This means the agent should not engage in new positions which make it possible to run forever (continuous overlapping new positions like new challenges or new fills). Specifically fills or challenges are new entry points for further interaction with the system.
  • The agent should follow the protocol on all claims to receive his funds back eventually.
  • The agent will input new funds into the system if and only if it leads to finalizing outstanding positions (claims) according to the protocol to receive his funds back(Here the only case is if the agent gets challenged on one of his existing claims aka where he is already participating)
  • As soon as the agent has no funds left in all Beamer contracts, the software will exit

If you are uncertain with a specific case, please look at the above statements and see if they answer your case. If not we should extend the list of invariants.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants