Skip to content

Commit

Permalink
chore: add gas rebates for august (#4636)
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Rice <matthewcrice32@gmail.com>
  • Loading branch information
mrice32 authored Sep 11, 2023
1 parent 4b015bc commit ceca283
Show file tree
Hide file tree
Showing 2 changed files with 116 additions and 2 deletions.
11 changes: 9 additions & 2 deletions packages/affiliates/gas-rebate/VoterGasRebateV2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import { findBlockNumberAtTimestamp, getWeb3 } from "@uma/common";
import fs from "fs";
import path from "path";

const { OVERRIDE_FROM_BLOCK, OVERRIDE_TO_BLOCK } = process.env;

export async function run(): Promise<void> {
console.log("Running UMA2.0 Gas rebate script! This script assumes you are running it for the previous month🍌.");

Expand All @@ -28,8 +30,13 @@ export async function run(): Promise<void> {
prevMonthEnd.setUTCHours(23, 59, 59);

// Fetch associated block numbers for the start and end of the previous month.
const fromBlock = (await findBlockNumberAtTimestamp(getWeb3(), prevMonthStart.getTime() / 1000)).blockNumber;
const toBlock = (await findBlockNumberAtTimestamp(getWeb3(), prevMonthEnd.getTime() / 1000)).blockNumber;
const fromBlock = OVERRIDE_FROM_BLOCK
? Number(OVERRIDE_FROM_BLOCK)
: (await findBlockNumberAtTimestamp(getWeb3(), prevMonthStart.getTime() / 1000)).blockNumber;

const toBlock = OVERRIDE_TO_BLOCK
? Number(OVERRIDE_TO_BLOCK)
: (await findBlockNumberAtTimestamp(getWeb3(), prevMonthEnd.getTime() / 1000)).blockNumber;

console.log("Current time:", moment(currentDate).format());
console.log("Previous Month Start:", moment(prevMonthStart).format(), "& block", fromBlock);
Expand Down
107 changes: 107 additions & 0 deletions packages/affiliates/gas-rebate/rebates/Rebate_35.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
{
"votingContractAddress": "0x004395edb43EFca9885CEdad51EC9fAf93Bd34ac",
"rebate": 35,
"fromBlock": 17809276,
"toBlock": 18037988,
"countVoters": 97,
"totalRebateAmount": 5.182931152764532,
"shareholderPayout": {
"0xeE160154b02A2e404c6c13ff0B28Ed76010cf07d": 0.013956300606672162,
"0x4B8aef878255F6242606Fe5e73D659004F5A34fA": 0.06013152477122751,
"0xC03808e0Af01563A739e408268d5517Dd7d710f3": 0.06207784587300367,
"0x07148984389eddf3A188943807310EA9E22Cef50": 0.052648220437928064,
"0x7ceb2a5C3395A5cfE09B66E7cEd496061301c316": 0.05552305191545385,
"0xFB9D972a3CB1C8Fdda9b2dd973C15047a9e56c17": 0.05873588322230685,
"0xB2d61A9FB039CAd0Eb9d44FC19A2684Db3343d22": 0.0602617527385154,
"0xbbf01C2c007F2fE5D2e26dBc6Ad0b45C61D6D765": 0.04501849741642846,
"0x08A8F08bd1e7eAF0d1eC7E81b60E194ea783B996": 0.04478063609258157,
"0x9B6f4d48fD61313204F7C8fBe9dFeC6384aA4cEd": 0.04412910567926406,
"0x4ddd9aF5f091A11438f3C4F618F1257D6D660Cb2": 0.04501342491794611,
"0xcfc50541c3dEaf725ce738EF87Ace2Ad778Ba0C5": 0.06589911454459357,
"0x7c8eba6dF6115D4C9A84E83F77B7E6Bb9d266c2A": 0.01947191172154929,
"0xd9AaeEAa94FAD39bAf37B713E833105227bf1476": 0.04477341293146924,
"0x62763A0D45Eb16EFe2B9f2f30743BE0e6ec3A207": 0.057303491437789456,
"0xc3d26aa4954816330C5ffc9bb2d46acbCEaff130": 0.04736530857207036,
"0xD2A78Bb82389D30075144d17E782964918999F7f": 0.05605864651008826,
"0x69D0341d380a1229f4751a0A721345dBc716586C": 0.09353174883976258,
"0x51FcFc7D4A032478B8919e30cE52B39FbE823Fe8": 0.06118584983896231,
"0xDF67cbA8261c6D8C15c735009F61e2CC9F852DE3": 0.05562558624558468,
"0xDCf99bA641c98E37dF8ea31188aD7E7Fa5501B09": 0.10677903924717691,
"0x3B271e8F1409E8e90c484d3591143bd7e1d2A177": 0.11123876628026066,
"0xfD8355b24aB8815cA2d76d1E495DC29B4330241f": 0.09468222900880366,
"0xe6b5A31d8bb53D2C769864aC137fe25F4989f1fd": 0.040225204312047035,
"0x021F0b20dA3b0471c175fBC85eD5C09055FeC061": 0.10143464216188386,
"0x342061D54cff1F4886aA3cfcfd2A9BaDc324bdf1": 0.05344970927279967,
"0x30b2DAEb3757B6C7462cd0D776828F8d7398BE50": 0.04657532015654395,
"0x96c00fDDa3f3129A55C0Bc9b48Ef504C3D5594e4": 0.04459344838767171,
"0xBdDbc13abDC4d3b617c2e573C26cd5a7F24A0478": 0.06089154715567821,
"0xA7b9D5Fc54eb3FfE1985a10e28d045a9b89487D0": 0.03780730650100522,
"0x7b2483D0f917a4F7A04d1E13743C99ad9d249462": 0.00573774621508231,
"0x4f49D938c3Ad2437c52eb314F9bD7Bdb7FA58Da9": 0.04739251348288664,
"0xe63757E3cD485C9b35b3a972fFFA2d91B8649483": 0.04490640895406897,
"0x6aEdb6460ABAE82F5ED77aF1d5e9Fe6F701d8c4A": 0.04120360963958327,
"0xE708e10a80c8FcFF34e7d6715446D7820318b0D5": 0.04714630998148623,
"0xD431B7c1433FbA9a5aa5330E5211F4773B95E9d9": 0.044154372788598004,
"0x99BcEa6bB0403927fB3c038163478D5b42082Fd9": 0.04768482253294093,
"0xe8b0a13e65Cc30E142EB125bFA3Fb4DE3a190ad8": 0.1032533093298513,
"0x66b5409f52d23ef87bDBfaa7312F8D790755fE13": 0.09938104672900287,
"0xb5eeDdFF4641Fea71C0b9A344AEd1a49E38e55d5": 0.09086551963585593,
"0x64f7354Fb18B7CeE35746078E1521B93feE6E061": 0.05249443531320483,
"0x9BC114CbDf47021f15416e720bC71b5341120E87": 0.042228293450130384,
"0x760680a3000397929aed8c1f0f56B8b1AA6F7777": 0.0726617075603671,
"0x11eFc2638184a0382BF1bb29C4047c6111F8f3C7": 0.0639600089375181,
"0x7cac2ab1CF9dc459ca88A85D72Ac94DE2691f1E5": 0.06589420645199164,
"0xFc204FCfd2A579157898A212ea25Ac98de2b1E1C": 0.06559185934944017,
"0xaF4C815CF13Bc8671a2a12BdE62aABEC24651ccC": 0.05151157397461226,
"0x6147d56b02faBD35cd9fC2B80a60276cDf089521": 0.05163519585930279,
"0xA4e3555ab4Bb3edD2F50b82279d30D6b49261FCc": 0.04358586061483825,
"0x54B0353E3a4c7F63874DA3799DA8232e36935467": 0.041923818152051685,
"0x9a25BE88282610D029D0b40Fa36E0295F4918d90": 0.04966984477639265,
"0xA3f76c31f57dA65B0ce84c64c25E61BF38c86BEd": 0.06321105662079184,
"0x6573e30Ee0ad46BC9aFA0C2aDb0D3f147D658EFE": 0.06701629113970341,
"0x996d5138843993Cebc554c20d82310a43802aFF1": 0.10372427853102763,
"0x336B9DE28D67D692C31DF93A9b8630B2Fa50d88f": 0.08455794566812513,
"0xf445567E961c533e26430005c142DEe831A6376e": 0.03372650650599399,
"0x2B6561E955965DB87f48963E1573F819c31CDAf0": 0.043264533435977526,
"0xF9D0De258931D88E370245Ebf8b40119EC91912b": 0.10529379653732046,
"0x48c7e0db3DAd3FE4Eb0513b86fe5C38ebB4E0F91": 0.0649702369375065,
"0x82b6a4Ebc3904b7aABD4E85510045EFf0d43a6Bd": 0.07547491169365271,
"0xD9F9F15e1DCdA849a48EE048892C9B31287C7598": 0.06595979969128123,
"0x45F2aBcE86a938Bb4d4633048dfA15bED7A5E310": 0.05996664523885716,
"0xB72d332C48066f849cB521a64a4089ae5242164F": 0.039427089564457146,
"0xDd4B9851525bc838a5aAf3e4464B0456b4a22C31": 0.038454092971938796,
"0x9b8f31D4A132cFd3425EEf49076e56e60Dc1Ed2F": 0.06820586808019584,
"0xaE90B9bc86DBa4D1C0ff98c496df2331220FC2cd": 0.06575537109646737,
"0x260D417fBD1716B1375CD311f8a6677c4a780B3A": 0.06523351676687747,
"0x2367432dc27E2e96b7AB8a0b0e4fCb28Dd5a1C1F": 0.06316153802691539,
"0x126db3213b309A8D554594e591e614425cCaC78e": 0.059384934343346796,
"0x2cf6988D57d0df95d3FF37CDfBFe0520F15c860F": 0.07802160864561065,
"0x49e0cdd718d330E5A27856256236b4e56a76D3fB": 0.08406228671765334,
"0x1fdef3D3c7984a945008C253caA6cf380fDdb16f": 0.03662482229174926,
"0x4c9F7207be28278b9DCA129f2e211AcfFf48Fb01": 0.042626640456407024,
"0x2993dB31D165c33D848e44A1C26a805bA411d324": 0.013392803930968599,
"0x5bdAfB8d0270F2833433CCd77493dC40BA94C0f6": 0.05377748483829994,
"0xdE0AEf70a7ae324045B7722C903aaaec2ac175F5": 0.05633564108625502,
"0x85f545CEeB98c8FB47C9d4411450D018Cf1E3064": 0.03576781491993113,
"0x644a7FF3CDFF23C3F10F25807A40Fa48AFF34885": 0.03216475002326705,
"0x8A752066907ECc34Bb2a37f08C69701110aB04f1": 0.05545011690447696,
"0x4d7ef23add041e515077233023a6B9A9995e32BE": 0.04158512920449316,
"0x8bd7B5E860998607715Da42944cc9DE3486A3Ae2": 0.04127463119217362,
"0xAC465fF0D29d973A8D2Bae73DCF6404dD05Ae2c9": 0.03474395324281508,
"0x032d12e0058a7Da898C86C3C203b96F3840A1569": 0.002461973190787896,
"0x0a01f4A6711012157C1B33aD9c01aF7F526962f5": 0.05707957149036263,
"0x07B83aD78CACb5a730D719902CF9Ef59fB38DA98": 0.05778220759029844,
"0x2A0e2e3bcC873a6fBD6687b4E4EEb4F8B74AF129": 0.0884150053930531,
"0x128b7E7F0Bfa7CdA46bB4728A0DA88dBaA095026": 0.051248331338701915,
"0x3D65eD138686e2AD54006d4Db83aD4597D645370": 0.0816807959962793,
"0x043713b4C761c13B3DF131E43F8607B8d2DC853E": 0.006453197965119369,
"0xa31c2232842e631cCb2d2E4110B356Bab21E6020": 0.03704006601661167,
"0x110f0b1FAa1cB6EEd49883f960808C95F609f6fd": 0.00657101,
"0xCf7cdBBbf4be10b5f716b297B53d369626a8AA57": 0.024231488267617594,
"0x7e367235eF80109531113d8284A5593Ba6A40c22": 0.02009991208121637,
"0x949758647D0390cF44A0F244615B019C2429f769": 0.019587844990715735,
"0xfEc2Ade141272f5271FEbaDFca5d21Ca30fc04a5": 0.025824909050900867,
"0x814e9565FF5669e43d726Df191bF86B618EA5128": 0.009777971897540191,
"0xc540eb6c7B3e44Ef8A45dB3aD8618404bAEd88F6": 0.008009780664514564
}
}

0 comments on commit ceca283

Please sign in to comment.