curve-dao-contracts icon indicating copy to clipboard operation
curve-dao-contracts copied to clipboard

New parameters script

Open romanagureev opened this issue 3 years ago • 0 comments

What I did

Added script to change parameters for pools and factory pools. It simulates the vote and checks twice(separately and together) that all parameters will be set.
Logs without transactions look like:

Address: 0xbEbc44782C7dB0a1A60Cb6fe97d0b483032FF1C7
Pool: 3pool
Current fee: 3000000
Current admin_fee: 5000000000

Fri Jul 23 11:56:22 2021, ts: 1627030582
New fee: 4000000
New admin_fee: 6000000000


Address: 0x9547429C0e2c3A8B88C6833B58FCE962734C0E8C
Pool: Curve.fi Factory USD Metapool: DOLA 3CRV Curve Metapool
Current A: 10
Current initial_A: 1000
Current future_A: 1000
Ramping to 100 by 1627733950

Tue Jul 20 11:56:09 2021, ts: 1626771369, A: 10
Fri Jul 23 06:46:54 2021, ts: 1627012014, A: 32
Mon Jul 26 01:37:39 2021, ts: 1627252659, A: 54
Wed Jul 28 20:28:24 2021, ts: 1627493304, A: 77
Sat Jul 31 15:19:10 2021, ts: 1627733950, A: 100


Address: 0x79a8C46DeA5aDa233ABaFFD40F3A0A2B1e5A4F27
Pool: busd
Current A: 500
Current fee: 4000000
Current admin_fee: 5000000000

Fri Jul 23 11:56:23 2021, ts: 1627030583
New A: 501
New fee: 1284938
New admin_fee: 3248234878

Test

I manually checked

new_parameters = [  # CHANGE
    ("new_fee", "0xbEbc44782C7dB0a1A60Cb6fe97d0b483032FF1C7", 4000000, 6000000000),  # 3pool
    ("new_parameters", "0x79a8C46DeA5aDa233ABaFFD40F3A0A2B1e5A4F27", 501, 1284938, 3248234878, 0),  # busd
    # aave fee can't be changed due to incompatible 'commit_new_fee'
    ("new_parameters", "0xA2B47E3D5c44877cca798226B7B8118F9BFb7A56", 299, 9843023, 4890047381, 1),  # compound
    # saave fee can't be changed due to incompatible 'commit_new_fee'
    ("new_fee", "0x2dded6Da1BF5DBdF597C45fcFaa3194e53EcfeAF", 9912039, 4666488277),  # ib
    ("new_fee", "0x93054188d876f558f4a66B2EF1d97d16eDf0895B", 1000000, 1000000000),  # ren
    ("new_fee", "0xc5424B857f758E906013F3555Dad202e4bdB4567", 1010101, 3333333333),  # seth
    ("new_fee", "0xDC24316b9AE028F1497c275EB9192a3Ea0f67022", 1234567, 8910111213),  # steth
    ("new_parameters", "0xA5407eAE9Ba41422680e2e00537571bcC53efBfD", 98, 9876543, 2100000000, 3),  # susd
    ("new_parameters", "0x45F783CCE6B7FF23B2ab2D70e416cdb7D6055f51", 404, 3000000, 5000000000, 0),  # y
    ("ramp_A", "0xbEbc44782C7dB0a1A60Cb6fe97d0b483032FF1C7", False, 3000, 1626733950 + 1231441),  # 3pool
    ("ramp_A", "0xDeBF20617708857ebe4F679508E7b7863a8A8EeE", False, 1000, 1626733950 + 1298942),  # aave
    ("ramp_A", "0xEB16Ae0052ed37f479f7fe63849198Df1765a733", False, 10, 1626733950 + 1000000),  # saave
    ("ramp_A", "0x2dded6Da1BF5DBdF597C45fcFaa3194e53EcfeAF", False, 90, 1626733950 + 1000000),  # ib
    ("ramp_A", "0x93054188d876f558f4a66B2EF1d97d16eDf0895B", False, 123, 1626733950 + 1000000),  # ren
    ("ramp_A", "0xc5424B857f758E906013F3555Dad202e4bdB4567", False, 193, 1626733950 + 1000000),  # seth
    ("ramp_A", "0xDC24316b9AE028F1497c275EB9192a3Ea0f67022", False, 219, 1626733950 + 1234567),  # steth
    ("ramp_A", "0x9547429C0e2c3A8B88C6833B58FCE962734C0E8C", True, 100, 1626733950 + 1000000),  # metapool
    # ("new_fee", pool: address, new_fee: int, new_admin_fee: int)
    # ("ramp_A", pool: address, is_factory_pool: bool, new_A: int, future_time: int)
    # ("new_parameters", pool: address, new_A: int, new_fee: int, new_admin_fee: int,
    # min_asymmetry: int)
]

(all pools from https://www.cognitiveatom.com/curve/)

romanagureev avatar Jul 13 '21 09:07 romanagureev