Hackathon: Scaling Ethereum 2024
Pre-releaseProof of Concept
This is the version that was submitted to ETHGlobal's Scaling Ethereum 2024 hackathon.
Showcased here: https://ethglobal.com/showcase/robosaver-1t5eh
This PoC assumes that the safe has liquidity in the Balancer stEUR/EURe pool to begin with. The safeTopup
function exists to build the necessary calldata for the EURe withdrawal, and sends that payload to the delay module by passing it to execTransactionFromModule
. After the cooldown has passed, executeNextTx
can then be called (permissionlessly) on the delay module to actually execute it.
This process is then wrapped in the checker
function; it either returns the payload necessary to call safeTopup
or to call executeNextTx
. A Gelato worker can then constantly poll checker
, to know if it should top up the safe balance or execute a queued transaction.
Onchain
This process can be observed to successfully work in the TopupTest.t.sol test. We were also able to successfully run this onchain:
safeTopup
call to queue up the withdrawal: https://gnosisscan.io/tx/0x97fadc58880278486e505fc9706a7cfcf5e0e0405446d0912e457bb961e65763#eventlogexecuteNextTx
call after the cooldown to actually withdraw: https://gnosisscan.io/tx/0x7852741c5b0e936703c5e0b3f69de368440ee1b1b54e2a8fd487f37fd743a68e
Note that the safe's EURe balance going below the threshold of 10 EURe triggered the Gelato worker to queue up the transaction automatically!
Deployments
Roles
: https://gnosisscan.io/address/0xa7882cd617b53ac5832acceec0e786dbd38fec4b#codeDelay
: https://gnosisscan.io/address/0x60bea2e60ac91d354cad23391100bc24ebc9450e#codeBouncer
: https://gnosisscan.io/address/0x40049dec4466fbdc52ec0c21c47c65a6315cf3e7#codeRoboSaverVirtualModule
: https://gnosisscan.io/address/0xe49c90547399f592e92dd28a149a448b17cf3b2a#code