Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.
This repository was archived by the owner on May 22, 2025. It is now read-only.

Console: Checking actions before scheduling #514

@heueristik

Description

@heueristik

Problem

Scheduling an optimistic action with an execution delay of several days and finding out that it cannot be executed is a very frustrating experience.

This can have two reasons:

  • internal contract state, e.g.,
    • the token balance is too low
    • a user role is wrong
  • external contract state, e.g.,
    • ERC-20 allowances are not set

This can lead to a large delay if one or multiple mitigating actions need to be scheduled and/or, worse, to the loss of the collateral.
The latter happened frequently, and more than 350 ANT are irretrievably lost by the time of writing.

Solution

  • The action should be checked before sending it.
  • On failure, It should display a verbose warning. This could be the revert string or, even better, additional information how to fix this issue for common pitfalls such as ERC-20 allowances, insufficient balance, etc.
  • It should still be allowed to schedule the action because the state could be correct at the time of execution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions