-
Notifications
You must be signed in to change notification settings - Fork 4
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
feat: gas optimization #33
Comments
Analyze gas consumptions by running simulation testing
Gas-guzzling partsGetNetAmountStateEssentials (not msg, but heavy gas consumer)
LiquidStake
LiquidUnstake
ClaimDiscountedReward
Normal parts (< 40K)
|
Dependent on Utilization RatioLiquidStake (Total Gas Usage at SoftCap:
LiquidUnstake (Total Gas Usage at SoftCap:
ClaimDiscountedReward (Total Gas Usage at SoftCap:
Not Dependent on Utilization Ratio
GetNetAmountStateEssentialsThis function is most gas-guzzling function in lsm. For each paired chunks, it consumes about
For each unbonding chunks, it consumes about
|
@dongsam As we can said earlier, I'll try optimize gas consumption for LiquidUnstake
|
@dongsam
commit: 28a6276 Effects: gas consumption reduced
|
@zsystm good,
|
@dongsam
Effects: a huge decrease of gas consumption
commit: 6ec0f10 |
While fuzzing tests liquidstaking module, it often exceeded 20,000,000.
Need to optimize gas consumption.
The text was updated successfully, but these errors were encountered: