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

Agent passive mode / safe shutdown #1757

Closed
fredo opened this issue Apr 27, 2023 · 3 comments
Closed

Agent passive mode / safe shutdown #1757

fredo opened this issue Apr 27, 2023 · 3 comments
Assignees
Labels
needs discussion Unclear issue description and needs further discussion before refinement can be done needs refinement Issues that have been align on and now need to go through the refinement process

Comments

@fredo
Copy link
Contributor

fredo commented Apr 27, 2023

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 each filled request, the agent requires to have a certain amount of ETH to settle the transfer correctly (claim stake, tx costs). Imagine a case where the funds are depleted on the source side. The agent would continue to fill on the target side (entering into new risk positions) but being unable to claim.
Economically speaking, there can be a threshold set, at which the agent is not safe to fill a request.
Once we have such a feature, we could build the following things on top:

  • Run agent in passive mode, to not fill but handle all claims until withdraw (necessary when an agent wants to exit)
  • Shutdown agent safely (at least claim, unclaimed fills while not filling new requests before shutdown) (Note this doesn't help for challenges, but less risky compared to now)
  • Only fill if enough ETH
  • Only challenge if enough ETH

Currently, LPs have to deal with managing ETH balances on all chains and making sure that there is always enough on all chains. Recent example what happened on mainnet: Agent staked all his remaining ETH in challenge on (source chain), continued to fill requests on other chains, but wasn't able to claim them due to insufficient funds on source chain. Note, that this happened in a matter of minutes, hard to deal with as a human.

@andfletcher andfletcher added needs discussion Unclear issue description and needs further discussion before refinement can be done needs refinement Issues that have been align on and now need to go through the refinement process labels May 4, 2023
@andfletcher
Copy link
Contributor

andfletcher commented Jun 19, 2023

The issue should be split into two issues:

  • shutdown mode (default shutdown should be safe)
  • passive mode (start node up into passive mode but also turn active node into a passive node) /only if there is nothing there that could result in the loss of money

@andfletcher andfletcher self-assigned this Jun 19, 2023
@andfletcher
Copy link
Contributor

Docker-compose down should result in the agent shutting down but still staying up long enough to claim all outstanding fills.

Alternatively do a shutdown and start in passive mode

This was referenced Jul 4, 2023
@fredo
Copy link
Contributor Author

fredo commented Jul 4, 2023

closing in favor of #2012 and #2013

@fredo fredo closed this as completed Jul 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs discussion Unclear issue description and needs further discussion before refinement can be done needs refinement Issues that have been align on and now need to go through the refinement process
Projects
None yet
Development

No branches or pull requests

2 participants