Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v10] Thirdening Testing #1597

Closed
5 tasks done
Tracked by #1608
czarcas7ic opened this issue May 27, 2022 · 6 comments
Closed
5 tasks done
Tracked by #1608

[v10] Thirdening Testing #1597

czarcas7ic opened this issue May 27, 2022 · 6 comments
Assignees

Comments

@czarcas7ic
Copy link
Member

czarcas7ic commented May 27, 2022

Background

While there is no reason to be suspicious of the code in place to reduce token emissions by 1/3rd every year (the thirdening), since this is a fairly significant event, it should get extensively tested prior to it happening.

Suggested Design

Prior to June 18th

  • Spin up a state exported testnet
    • Expedite the daily epoch to happen every 60 seconds
    • Take note of emissions prior to thirdening
    • Take note of emissions after thirdening
  • Check osmo supply pre & post thirdening

Acceptance Criteria

Actions related to thirdening are reviewed for any odd behaviors. If odd behavior is noted, a plan is put into action to address prior to June 18th

@daniel-farina daniel-farina moved this to Needs Review 🔍 in Osmosis Chain Development May 27, 2022
@czarcas7ic czarcas7ic changed the title [v9] Thirdening Testing [v10] Thirdening Testing May 27, 2022
@czarcas7ic czarcas7ic mentioned this issue May 27, 2022
16 tasks
@czarcas7ic czarcas7ic moved this from Needs Review 🔍 to Todo 🕒 in Osmosis Chain Development Jun 2, 2022
@czarcas7ic
Copy link
Member Author

czarcas7ic commented Jun 3, 2022

Epoch 364:

  • Start Height: 4642252
  • Epoch Provisions: 821917808219.178082191780821917
  • Osmo comm pool: 59134841349889

Epoch 365:

  • Start Height: 4642313
  • Epoch Provisions: 821917808219.178082191780821917
  • Osmo comm pool: 59448603001566
    • 5% of emission is 41095890410.95890410958904109585
    • Prior Osmo comm pool plus this 5%: 59175937240299.95890410
    • To account for LP dist to community pool
      • Weight for gauge 0 is 19500000/100000689=19.499865%
      • 45% of emission that go to LPs is 369863013698.63013698630136986265
        • 369863013698.63013698630136986265 * 19.499865% = 72122788356.16438356164383
    • 72122788356.16438356164383 + 41095890410.95890410958904109585 = 113218678767.12328767123287109585
    • 59134841349889 + 113218678767.12328767123287109585 = 59248060028656.12328767123287109585
    • 59448603001566-59248060028656.12328767123287109585 = 200542972909.87671232876712890415
    • The actual comm pool has 200542972909.87671232876712890415 more osmo than expected

Epoch 366:

  • Start Height: 4642375
  • Epoch Provisions: 821917808219.178082191780821917
  • Osmo comm pool: 59762364653242

Epoch 367:

  • Start Height: 4642438
  • Epoch Provisions: 547945205479.452054246575342465
  • Osmo comm pool: 59971539087920

Epoch provisions are now 2/3rds what it was, as expected. The thirdening will happen on epoch 367. This translates to the epoch that occurs on Monday, June 20th on mainnet.

@czarcas7ic
Copy link
Member Author

czarcas7ic commented Jun 3, 2022

I wanted to query to community pool and note the differences, but for some reason I think the state export broke this connection since the account I know to be the community pool does not increase at all (both pre and post thirdening). I could also be querying the wrong address

Edit: Community pool address is osmo1jv65s3grqf6v6jl3dp4t6c9t9rk99cd80yhvld

@czarcas7ic
Copy link
Member Author

My numbers weren't adding up for community pool, so this is my attempt at getting them to work for a dev reward wallet. Should be less varying factors. Doing it on this address osmo14kjcwdwcqsujkdt8n5qwpd8x8ty2rys5rjrdjj with 0.288700000000000000 weight

Epoch 364:

  • Start Height: 4642252
  • Epoch Provisions: 821917808219.178082191780821917
    • Goes to dev rewards: 205479452054.79452054794520547925
    • Goes to specific wallet: dev rewards*0.2887=59321917808.219178082191780821859475
  • Wallet Bal: 21533856163941

Epoch 365:

  • Start Height: 4642313
  • Epoch Provisions: 821917808219.178082191780821917
    • Goes to dev rewards: 205479452054.79452054794520547925
    • Goes to specific wallet: dev rewards*0.2887=59321917808.219178082191780821859475
    • Add rewards to previous wallet balance to get expected wallet bal
      • 59321917808.219178082191780821859475 + 21533856163941 = 21593178081749.219178082191780821859475
  • Actual Wallet Bal: 21593178081748
  • Dif is -1.21917808219 less osmo than expected

Epoch 366:

  • Start Height: 4642375
  • Epoch Provisions: 821917808219.178082191780821917
    • Goes to dev rewards (25%): 205479452054.79452054794520547925
    • Goes to specific wallet: dev rewards*0.2887=59321917808.219178082191780821859475
    • Add rewards to previous wallet balance to get expected wallet bal
      • 59321917808.219178082191780821859475 + 21593178081748 = 21652499999556.219178082191780821859475
  • Actual Wallet Bal: 21652499999555
  • Dif is -1.21917808219 less osmo than expected

Epoch 367:

  • Start Height: 4642438
  • Epoch Provisions: 547945205479.452054246575342465
    • Goes to dev rewards: 136986301369.86301356164383561625
    • Goes to specific wallet: dev rewards*0.2887 = 39547945205.479452015246575342411375
    • Add rewards to previous wallet balance to get expected wallet bal
      • 39547945205.479452015246575342411375 + 21652499999555 = 21692047944760.479452015246575342411375
  • Actual Wallet Bal: 21692047944760
  • Dif is -0.479452015 less osmo than expected

@czarcas7ic czarcas7ic moved this from Todo 🕒 to Needs Review 🔍 in Osmosis Chain Development Jun 3, 2022
@ValarDragon ValarDragon moved this from Needs Review 🔍 to In Progress🏃 in Osmosis Chain Development Jun 6, 2022
@ValarDragon ValarDragon moved this from In Progress🏃 to Needs Review 🔍 in Osmosis Chain Development Jun 6, 2022
@czarcas7ic
Copy link
Member Author

Spun up another testnet to check total supply

Epoch 364:

  • Start Height: 4694728
  • Epoch Provisions: 821917808219.178082191780821917
  • Total Supply
    • 2581482187359696

Epoch 365:

  • Start Height: 4694784
  • Epoch Provisions: 821917808219.178082191780821917
  • Total Supply
    • 2582304105167908
  • Epoch 365 supply - epoch 364 supply should equal epoch provisions
    • 2582304105167908 - 2581482187359696 = 821917808212
    • 821917808219.178082191780821917 - 821917808212 = 7.178082191780821917
    • ~7.18 osmo unaccounted for

Epoch 366:

  • Start Height: 4694841
  • Epoch Provisions: 821917808219.178082191780821917
  • Total Supply
    • 2583126022976120
  • Epoch 366 supply - epoch 365 supply should equal epoch provisions
    • 2583126022976120 - 2582304105167908 = 821917808212
    • 821917808219.178082191780821917 - 821917808212 = 7.178082191780821917
    • ~7.18 osmo unaccounted for

Epoch 367:

  • Start Height: 4694896
  • Epoch Provisions: 547945205479.452054246575342465
  • Total Supply
    • 2583673968181593
  • Epoch 367 supply - epoch 366 supply should equal epoch provisions
    • 2583673968181593 - 2583126022976120 = 547945205473
    • 547945205479.452054246575342465 - 547945205473 = 6.452054246575342465
    • ~6.45 osmo unaccounted for

@czarcas7ic
Copy link
Member Author

Are we happy with the above tests? If so, I will close this issue

@ValarDragon
Copy link
Member

Yeah,thanks! We can just keep an eye on the total supply query on mainnet as a final sanity check

Repository owner moved this from Needs Review 🔍 to Done ✅ in Osmosis Chain Development Jun 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

2 participants