Skip to content

feat(affiliates): add gas rebate 69 and 70 for June 2026#4960

Open
md0x wants to merge 3 commits into
masterfrom
pablo/gas-rebate-69-june-2026
Open

feat(affiliates): add gas rebate 69 and 70 for June 2026#4960
md0x wants to merge 3 commits into
masterfrom
pablo/gas-rebate-69-june-2026

Conversation

@md0x

@md0x md0x commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Summary

Fix cross-month commit gas reimbursement in the VotingV2 gas rebate script, add an optional delegate exclusion list, and add the June 2026 payout split into two rebates at the point the exclusion policy takes effect.

Fix: cross-month commit gas

Commits were reimbursed only when their eligible reveal fell inside the same monthly block range, so votes committed at the end of a month but revealed at the start of the next had their commit gas reimbursed by neither payout. The calculator now scans a lookback window (COMMIT_LOOKBACK_BLOCKS, default 50000) before fromBlock to recover those commit transactions, skipping any transaction whose votes were eligibly revealed before fromBlock so nothing the previous month already paid is double counted.

Feature: delegate exclusion list

Optional address list (EXCLUSION_LIST_PATH, default gas-rebate/exclusions/rebate-exclusions.json); transactions sent from those addresses are dropped from the payout. IGNORE_EXCLUSION_LIST=true skips it. The list is kept private (gitignored) — the audit records only its SHA-256, size, and the excluded voter/rebate totals, so payouts stay reproducible without publishing the addresses.

June 2026 (split at the 2026-06-16 00:00 UTC reveal-phase boundary)

The delegate exclusion policy starts mid-month, so June is paid as two rebates split on a voting-round boundary (no round is split across the two):

  • Rebate 69 — 2026-06-01..15, blocks 25218798–25326350, no exclusion: 579 voters, 3.664251413949599720 ETH.
  • Rebate 70 — 2026-06-16..30, blocks 25326351–25433938, exclusion applied: 481 voters, 1.226035815163956121 ETH (47 delegate voters excluded, 0.204407810922449467 ETH).

Both audits report validation passed and 0 anomalies. Ranges are contiguous and cover the full month.

Validation

  • yarn test-local (affiliates) — calculator unit tests: boundary recovery, previous-month double-pay guard, out-of-window anomaly, and exclusion filtering.
  • tsc --noEmit clean.
  • Cross-check: full-June with no exclusion (5.094695 ETH) minus the excluded second-half rebate (0.204408 ETH) equals the 69+70 sum (4.890287 ETH).

@chatgpt-codex-connector

Copy link
Copy Markdown

💡 Codex Review

https://github.com/UMAprotocol/protocol/blob/5d176224d6751cb18156c826d579e4b9019d908a/packages/affiliates/gas-rebate/rebates/Rebate_69.audit.md#L44
P1 Badge Include cross-month commit gas before paying rebate 69

For votes whose reveal landed at the start of June but whose commit was before fromBlock, this artifact refunds the reveal gas but omits the corresponding commit gas: the audit shows 147,016 eligible reveals but only 128,751 matched commits, followed by 18,265 reveal_missing_commit anomalies starting here. The current V2 calculator only fetches commit receipts from matchingCommitEvents collected in the same block range, so Rebate 68 could not have matched these June reveal events either; these commit transactions are therefore not reimbursed by either monthly payout.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@md0x md0x marked this pull request as draft July 13, 2026 14:05
@md0x md0x force-pushed the pablo/gas-rebate-69-june-2026 branch from 5d17622 to 36d1e02 Compare July 13, 2026 14:50
@md0x md0x marked this pull request as ready for review July 13, 2026 14:50

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 36d1e0287c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

maxBlockLookBack,
transactionConcurrency,
maxPriorityFee,
commitLookbackBlocks,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Record commit lookback in the audit config

When COMMIT_LOOKBACK_BLOCKS is overridden, the payout can change because this value is now passed into the calculator, but the monthly audit's effectiveConfig still omits it. That leaves committed rebate artifacts (and later correction/audit reruns if the default changes) without the policy parameter needed to reproduce why boundary commits were or were not recovered; include the resolved lookback value in MonthlyAuditReportConfig/Markdown alongside the other effective parameters.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 100fe2ccommitLookbackBlocks is now recorded in the monthly audit effectiveConfig and rendered in the Markdown (Commit lookback blocks: 50000), alongside the other effective parameters.

Commits were only refunded when their matching eligible reveal fell inside
the same monthly block range. Votes committed near the end of a month but
revealed at the start of the next (a reveal phase straddling midnight of the
1st) had their commit gas reimbursed by neither payout: the reveal month
never saw the commit, and the commit month never matched it to an in-range
reveal.

Scan a configurable lookback window (COMMIT_LOOKBACK_BLOCKS, default 50000)
before fromBlock to recover the commit transaction for such reveals. A commit
transaction is skipped when any vote it commits was eligibly revealed before
fromBlock, so transactions already reimbursed by the previous month are never
double paid. reveal_missing_commit anomalies now fire only for commits absent
from the lookback window. Adds a boundaryCommitEventsRecovered audit metric and
records the resolved commit lookback in the monthly audit effective config so
committed artifacts remain reproducible.
@md0x md0x force-pushed the pablo/gas-rebate-69-june-2026 branch from 36d1e02 to 1cd1a7b Compare July 13, 2026 15:12
@md0x

md0x commented Jul 14, 2026

Copy link
Copy Markdown
Contributor Author

Re: the cross-month commit gas finding — fixed in 100fe2c.

The calculator now recovers the commit transaction for eligible reveals whose commit landed before fromBlock by scanning a lookback window (COMMIT_LOOKBACK_BLOCKS, default 50000). A commit transaction is skipped when any vote it commits was eligibly revealed before fromBlock, so transactions already reimbursed by the previous month are not double paid; reveal_missing_commit now fires only for commits absent from the lookback window.

For rebate 69 this recovered 18,265 boundary commit transactions (total payout 4.893278 → 5.094695 ETH). The audit reports validation passed with 0 anomalies.

@md0x md0x force-pushed the pablo/gas-rebate-69-june-2026 branch from 1cd1a7b to bd2acd3 Compare July 14, 2026 10:21
@md0x md0x changed the title feat(affiliates): add gas rebate 69 for June 2026 feat(affiliates): add gas rebate 69 and 70 for June 2026 Jul 14, 2026
@md0x md0x force-pushed the pablo/gas-rebate-69-june-2026 branch from bd2acd3 to d1ced48 Compare July 14, 2026 11:08
md0x added 2 commits July 14, 2026 11:21
…s rebate

Load an optional address exclusion list (EXCLUSION_LIST_PATH, default
gas-rebate/exclusions/rebate-exclusions.json) and drop transactions sent from
those addresses from the payout, so delegate voters can be excluded. Set
IGNORE_EXCLUSION_LIST=true to skip it entirely, used for the portion of a month
before the exclusion policy takes effect. The list is kept private (gitignored);
the monthly audit records only its SHA-256, size, and the excluded voter/rebate
totals, so payouts stay reproducible without publishing the addresses.
Split June at the reveal-phase boundary on 2026-06-16 00:00 UTC: rebate 69
covers 2026-06-01..15 with no exclusions, and rebate 70 covers 2026-06-16..30
with the delegate exclusion list applied.
@md0x md0x force-pushed the pablo/gas-rebate-69-june-2026 branch from d1ced48 to 5a656f1 Compare July 14, 2026 11:21
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.

1 participant