-
Notifications
You must be signed in to change notification settings - Fork 18
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
Barz v2 #2
base: develop
Are you sure you want to change the base?
Barz v2 #2
Conversation
function execute( | ||
ExecMode _mode, | ||
bytes calldata _executionCalldata | ||
) external payable override onlyEntryPointOrSelf onlyWhenUnlocked withHook { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
allowing self-call in execute functions should be considered carefully.
there is an attack scenario here, where a user is tricked to permit a session key access to address(this).execute(), not knowing what this permission really entails.
the session key can then build a userop. that has userop.calldata with two nested executions, the first one passing the sessionkey permission, the 2nd one would be arbitrary executions. this can lead to loss of funds
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zeroknots Actually, the execute function of the 7579 part, the MMSAFacet's execute()
cannot make a self call.
Self calls can only be made when the user uses the default VerificationFacet for UserOp Validation and use executeSingle()
/ executeBatch()
from AccountFacetV2 for execution.
But it's a good callout, something worth deep consideration.
Barz V2 Upgrade
1. Add Multi-tier Module System
Concept and Distinction between Facets and Modules
Architecture of Facets in Multi-tier Module System
MMSAFacet
makes Barz to be ERC 7579 CompliantMSCAFacet
makes Barz to be ERC 6900 Compliant2. Add V2 Migrator Facet
3. Update Compiler Version to
0.8.26