Skip to content

feat: Penalty gas#12

Draft
chunter-cb wants to merge 1 commit intomasterfrom
penalty-gas-explicit
Draft

feat: Penalty gas#12
chunter-cb wants to merge 1 commit intomasterfrom
penalty-gas-explicit

Conversation

@chunter-cb
Copy link
Copy Markdown
Contributor

@chunter-cb chunter-cb commented Dec 16, 2024

This change adds the calculation for the penalty gas in the V0.7 Entrypoint to the postOp totalGasUsed calculation for ERC20 flows.

The penalty gas is based off of the executionGasLimit vs what was the actual execution gas used. This difference is charged at 10% in v0.7 as a method of preventing bundlers from a potential denial of service attack.

The paymaster now includes the gas penalty in postOp calculations to ensure the paymaster is properly paid for UserOperations onchain. Prior a userOp would not get paid for the penalty gas onchain, and was expected to be handled offchain by the exchange rate.

@chunter-cb chunter-cb marked this pull request as ready for review January 6, 2025 15:09
@chunter-cb chunter-cb marked this pull request as draft January 6, 2025 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant