I am reading a lot of documentations and source code about Safe and its ecosystem. My goal is to use this protocol for an upcoming hackathon project.
From my understanding, a guard can be set up (and removed) by the user to add additional checks before or after a transaction. I want to know if it is possible to enforce the use of a guard for a limited time, before allowing the user to remove it?
I want to do that to allow people to use a feature of my project that requires a monitoring of the transactions made by the user. Basically, the user will add the guard to its Safe wallet to access the feature, and should be able to take the guard off of its wallet after a given duration (1 month for example). Is it possible to do that without modifying the existing Safe code?
My guess is that the Guard could prevent the Safe wallet itself from calling GuardManager.setGuard()
through the GuardManager.checkTransaction()
call made by the wallet, but for that to happens the wallet should always call GuardManager.setGuard()
through its Safe.execTransaction()
method. I wonder if the FallbackManager
class could allow one to bypass the Guard checks, by adding a new fallback method that would call GuardManager.setGuard()
?
GuardManager.checkTransaction()
function. However, my concern is that I want the user to be unable to remove the guard once it is set, for a given amount of time. I guess theGuardManager.setGuard()
function can be catched and forbidden by the Guard itself, but does theFallbackManager
could allow the user to bypass this security?