UMAprotocol / protocol

UMA Protocol Running on Ethereum
https://uma.xyz
GNU Affero General Public License v3.0
361 stars 175 forks source link

feat: new snapshot proposal notifier #4671

Closed Reinis-FRP closed 6 months ago

Reinis-FRP commented 7 months ago

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

linear[bot] commented 7 months ago

UMA-1944 bots to post notifications on discord server to review osnap proposals to txn