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

Live mp and rewards #95

Merged
merged 2 commits into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 35 additions & 35 deletions .gas-report
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
| script/DeployRewardsStreamerMP.s.sol:DeployRewardsStreamerMPScript contract | | | | | |
|-----------------------------------------------------------------------------|-----------------|---------|---------|---------|---------|
| Deployment Cost | Deployment Size | | | | |
| 6200681 | 29704 | | | | |
| 6303045 | 30177 | | | | |
| Function Name | min | avg | median | max | # calls |
| run | 5302574 | 5302574 | 5302574 | 5302574 | 63 |
| run | 5397428 | 5397428 | 5397428 | 5397428 | 63 |


| script/DeploymentConfig.s.sol:DeploymentConfig contract | | | | | |
Expand All @@ -17,9 +17,9 @@
| script/UpgradeRewardsStreamerMP.s.sol:UpgradeRewardsStreamerMPScript contract | | | | | |
|-------------------------------------------------------------------------------|-----------------|---------|---------|---------|---------|
| Deployment Cost | Deployment Size | | | | |
| 2845816 | 14079 | | | | |
| 2948151 | 14552 | | | | |
| Function Name | min | avg | median | max | # calls |
| run | 2383391 | 2383391 | 2383391 | 2383391 | 3 |
| run | 2478266 | 2478266 | 2478266 | 2478266 | 3 |


| src/RewardsStreamer.sol:RewardsStreamer contract | | | | | |
Expand All @@ -39,7 +39,7 @@
| src/RewardsStreamerMP.sol:RewardsStreamerMP contract | | | | | |
|------------------------------------------------------|-----------------|--------|--------|--------|---------|
| Deployment Cost | Deployment Size | | | | |
| 2525879 | 11640 | | | | |
| 2628212 | 12113 | | | | |
| Function Name | min | avg | median | max | # calls |
| MAX_LOCKUP_PERIOD | 349 | 349 | 349 | 349 | 6 |
| MAX_MULTIPLIER | 251 | 251 | 251 | 251 | 33 |
Expand All @@ -50,31 +50,31 @@
| enableEmergencyMode | 2485 | 19392 | 24677 | 24677 | 8 |
| getAccount | 1661 | 1661 | 1661 | 1661 | 72 |
| getStakedBalance | 2629 | 2629 | 2629 | 2629 | 1 |
| getUserTotalMP | 9230 | 9230 | 9230 | 9230 | 1 |
| getUserTotalMaxMP | 3123 | 3123 | 3123 | 3123 | 1 |
| getUserTotalStakedBalance | 15118 | 15118 | 15118 | 15118 | 1 |
| getUserTotalStakedBalance | 15162 | 15162 | 15162 | 15162 | 1 |
| getUserVaults | 5201 | 5201 | 5201 | 5201 | 4 |
| initialize | 115611 | 115611 | 115611 | 115611 | 65 |
| lastRewardTime | 395 | 1395 | 1395 | 2395 | 2 |
| leave | 56244 | 56244 | 56244 | 56244 | 1 |
| lock | 12063 | 34172 | 16480 | 73975 | 3 |
| proxiableUUID | 331 | 331 | 331 | 331 | 3 |
| leave | 59897 | 59897 | 59897 | 59897 | 1 |
| lock | 12063 | 35390 | 16480 | 77628 | 3 |
| mpBalanceOfUser | 9185 | 9185 | 9185 | 9185 | 1 |
| proxiableUUID | 353 | 353 | 353 | 353 | 3 |
| registerVault | 55866 | 72766 | 72966 | 72966 | 257 |
| rewardEndTime | 373 | 1373 | 1373 | 2373 | 2 |
| rewardStartTime | 352 | 1352 | 1352 | 2352 | 2 |
| rewardsBalanceOf | 1317 | 1317 | 1317 | 1317 | 4 |
| setReward | 2583 | 50892 | 60278 | 102595 | 7 |
| rewardsBalanceOf | 3231 | 6627 | 7074 | 7341 | 8 |
| setReward | 2583 | 58371 | 86341 | 105731 | 7 |
| setTrustedCodehash | 24243 | 24304 | 24243 | 26243 | 65 |
| stake | 131082 | 170202 | 177899 | 198232 | 66 |
| totalMP | 373 | 373 | 373 | 373 | 81 |
| stake | 134799 | 172378 | 179192 | 199525 | 66 |
| totalMPAccrued | 395 | 395 | 395 | 395 | 81 |
| totalMaxMP | 350 | 350 | 350 | 350 | 81 |
| totalRewardsAccrued | 373 | 373 | 373 | 373 | 3 |
| totalRewardsSupply | 960 | 1921 | 1724 | 6700 | 30 |
| totalStaked | 396 | 396 | 396 | 396 | 82 |
| unstake | 60382 | 60919 | 60382 | 63877 | 13 |
| updateAccountMP | 15396 | 18474 | 17898 | 34998 | 21 |
| updateGlobalState | 11088 | 28045 | 25249 | 110284 | 21 |
| upgradeToAndCall | 3225 | 7887 | 8426 | 10936 | 5 |
| totalRewardsAccrued | 351 | 351 | 351 | 351 | 3 |
| totalRewardsSupply | 1025 | 1984 | 1806 | 6765 | 30 |
| totalStaked | 374 | 374 | 374 | 374 | 82 |
| unstake | 64035 | 64572 | 64035 | 67530 | 13 |
| updateAccountMP | 15392 | 17634 | 17898 | 17898 | 19 |
| updateGlobalState | 14317 | 26623 | 28594 | 28594 | 19 |
| upgradeToAndCall | 3225 | 7901 | 8448 | 10936 | 5 |


| src/StakeManagerProxy.sol:StakeManagerProxy contract | | | | | |
Expand All @@ -91,24 +91,24 @@
| enableEmergencyMode | 28480 | 45381 | 50665 | 50665 | 8 |
| getAccount | 2115 | 2115 | 2115 | 2115 | 72 |
| getStakedBalance | 7559 | 7559 | 7559 | 7559 | 1 |
| getUserTotalMP | 9660 | 9660 | 9660 | 9660 | 1 |
| getUserTotalMaxMP | 3553 | 3553 | 3553 | 3553 | 1 |
| getUserTotalStakedBalance | 15548 | 15548 | 15548 | 15548 | 1 |
| getUserTotalStakedBalance | 15592 | 15592 | 15592 | 15592 | 1 |
| getUserVaults | 5637 | 6762 | 5637 | 10137 | 4 |
| implementation | 343 | 775 | 343 | 2343 | 412 |
| lastRewardTime | 822 | 1822 | 1822 | 2822 | 2 |
| mpBalanceOfUser | 9615 | 9615 | 9615 | 9615 | 1 |
| rewardEndTime | 800 | 1800 | 1800 | 2800 | 2 |
| rewardStartTime | 779 | 4029 | 4029 | 7279 | 2 |
| rewardsBalanceOf | 1747 | 1747 | 1747 | 1747 | 4 |
| setReward | 28863 | 77206 | 86636 | 128881 | 7 |
| rewardsBalanceOf | 3661 | 7057 | 7504 | 7771 | 8 |
| setReward | 28863 | 84685 | 112699 | 132089 | 7 |
| setTrustedCodehash | 52889 | 52889 | 52889 | 52889 | 2 |
| totalMP | 800 | 800 | 800 | 800 | 81 |
| totalMPAccrued | 822 | 822 | 822 | 822 | 81 |
| totalMaxMP | 777 | 777 | 777 | 777 | 81 |
| totalRewardsAccrued | 800 | 800 | 800 | 800 | 3 |
| totalRewardsSupply | 1387 | 2498 | 2151 | 11627 | 30 |
| totalStaked | 823 | 823 | 823 | 823 | 82 |
| updateAccountMP | 41755 | 44833 | 44257 | 61357 | 21 |
| updateGlobalState | 37076 | 54033 | 51237 | 136272 | 21 |
| totalRewardsAccrued | 778 | 778 | 778 | 778 | 3 |
| totalRewardsSupply | 1452 | 2561 | 2233 | 11692 | 30 |
| totalStaked | 801 | 801 | 801 | 801 | 82 |
| updateAccountMP | 41751 | 43993 | 44257 | 44257 | 19 |
| updateGlobalState | 40305 | 52611 | 54582 | 54582 | 19 |
| upgradeToAndCall | 29868 | 33720 | 33720 | 37572 | 2 |


Expand All @@ -119,14 +119,14 @@
| Function Name | min | avg | median | max | # calls |
| STAKING_TOKEN | 216 | 216 | 216 | 216 | 1 |
| emergencyExit | 36375 | 48879 | 48113 | 65213 | 7 |
| leave | 33507 | 131439 | 60635 | 370978 | 4 |
| lock | 33245 | 60677 | 50845 | 107772 | 4 |
| leave | 33507 | 132169 | 62097 | 370978 | 4 |
| lock | 33245 | 61590 | 50845 | 111425 | 4 |
| owner | 2339 | 2339 | 2339 | 2339 | 257 |
| register | 87015 | 103915 | 104115 | 104115 | 257 |
| stake | 33411 | 241491 | 252403 | 272784 | 67 |
| stake | 33411 | 243707 | 253696 | 274077 | 67 |
| stakeManager | 368 | 368 | 368 | 368 | 257 |
| trustStakeManager | 28953 | 28953 | 28953 | 28953 | 1 |
| unstake | 33282 | 96630 | 102062 | 109909 | 14 |
| unstake | 33282 | 99918 | 105715 | 113562 | 14 |
| withdraw | 42289 | 42289 | 42289 | 42289 | 1 |


Expand Down
Loading
Loading