There have been issues where oSnap users created a totally valid proposals on snapshot, but their transaction data did not match the human readable rules. This could have been caught at the time the proposal was added to snapshot.
Summary
Adds oSnap monitor module to notify when new Snapshot proposals for oSnap are created and tries to simulate the payload.
Details
To avoid repeated notifications the bot needs to keep state - by default this is Google Datastore, but also local file storage can be selected.
Since oSnap might execute transactions in a bundle, it is not sufficient to simulate each transaction from safe separately as they could be order dependent. To simulate execution through oSnap module this requires a forked environment as if the proposal was already submitted on-chain. This also requires resetting bond amounts to 0 to ease proposal simulation.
As a follow-up, we should verify that the target oSnap module links back to the same Snapshot space where the proposal was created and voting period in rules is respected.
Testing
Check a box to describe how you tested these changes and list the steps for reviewers to test.
[ ] Ran end-to-end test, running the code as in production
[ ] New unit tests created
[ ] Existing tests adequate, no new tests required
Motivation
There have been issues where oSnap users created a totally valid proposals on snapshot, but their transaction data did not match the human readable rules. This could have been caught at the time the proposal was added to snapshot.
Summary
Adds oSnap monitor module to notify when new Snapshot proposals for oSnap are created and tries to simulate the payload.
Details
To avoid repeated notifications the bot needs to keep state - by default this is Google Datastore, but also local file storage can be selected.
Since oSnap might execute transactions in a bundle, it is not sufficient to simulate each transaction from safe separately as they could be order dependent. To simulate execution through oSnap module this requires a forked environment as if the proposal was already submitted on-chain. This also requires resetting bond amounts to 0 to ease proposal simulation.
As a follow-up, we should verify that the target oSnap module links back to the same Snapshot space where the proposal was created and voting period in rules is respected.
Testing
Check a box to describe how you tested these changes and list the steps for reviewers to test.
Issue(s)
Fixes https://linear.app/uma/issue/UMA-1944/bots-to-post-notifications-on-discord-server-to-review-osnap-proposals