Skip to content

fix: update snapshot top level domain#4878

Merged
gsteenkamp89 merged 2 commits intomasterfrom
fix-update-snapshot-domain
Sep 26, 2025
Merged

fix: update snapshot top level domain#4878
gsteenkamp89 merged 2 commits intomasterfrom
fix-update-snapshot-domain

Conversation

@gsteenkamp89
Copy link
Copy Markdown
Contributor

@gsteenkamp89 gsteenkamp89 commented Sep 26, 2025

closes UMA-2946

Support Snapshot .box domain in rules parsing

Motivation

  • What: Update the rules regex in packages/monitor-v2/src/monitor-og/SnapshotVerification.ts to accept Snapshot’s .box domain (with optional subdomains like v1.), while retaining support for .org.
  • Why: Snapshot now serves under .box. The previous regex only matched snapshot.org, causing valid rules strings to be rejected.
  • Impact: Backwards-compatible; accepts both snapshot.org and snapshot.box.

Change

  • Accept https://{optional-subdomain}.snapshot.(org|box)/#/... in parseRules.

Example accepted rules string from Paraswap

I assert that this transaction proposal is valid according to the following rules: Proposals approved on Snapshot, as verified at https://v1.snapshot.box/#/paraswap-dao.eth, are valid as long as there is a minimum quorum of 90000000 and a minimum voting period of 120 hours and it does not appear that the Snapshot voting system is being exploited or is otherwise unavailable. The quorum and voting period are minimum requirements for a proposal to be valid. Quorum and voting period values set for a specific proposal in Snapshot should be used if they are more strict than the rules parameter. The explanation included with the on-chain proposal must be the unique IPFS identifier for the specific Snapshot proposal that was approved or a unique identifier for a proposal in an alternative voting system approved by DAO social consensus if Snapshot is being exploited or is otherwise unavailable.

Testing

  1. Added a test case in /packages/monitor-v2/test/OptimisticGovernorMonitor.ts

Signed-off-by: Gerhard Steenkamp <gerhard@umaproject.org>
Signed-off-by: Gerhard Steenkamp <gerhard@umaproject.org>
@linear
Copy link
Copy Markdown

linear bot commented Sep 26, 2025

Copy link
Copy Markdown
Contributor

@Reinis-FRP Reinis-FRP left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

@gsteenkamp89 gsteenkamp89 merged commit 7304a8e into master Sep 26, 2025
7 checks passed
@gsteenkamp89 gsteenkamp89 deleted the fix-update-snapshot-domain branch September 26, 2025 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants