@edinsoncode Hello I cannot DM (no premium) - Led multiple projects on various chains (solana, base, hyperevm) with the most recent example being a launchpad with staking rewards that were all crosschain. All architecture/design decisions have been owned by me.
@edinsoncode@viaintisol Backend Engineer - https://t.co/Eutut5k1Kt
Led multiple projects on various chains (solana, base, hyperevm) with the most recent example being a launchpad with staking rewards that were all crosschain .
@HDdubRAVE Respect for uploading everything back, 2 years ago I lost my SD card with all of the old good tracks, it was a nightmare to restore them. Public archives help a lot and I would not have gotten into dubstep without you. I wish you all the best!
@RobgAfrica Hello, I'm interested in this however your DMs are not open. I've worked with erc20s before and I've built projects with my own stablecoins
Studying EIPs is still one of the best things you can spend time on. It helped me to find a few vulnerabilities and earn some easy $$$ by just reading the specs.
Here is a list of EIPs that will help you understand cross-chain interactions:
- ERC-7281 - Shared Security Vaults
- ERC-768 - Cross-Chain Order Flow Auctions
- ERC-4337 - Account Abstraction for Wallets
- EIP-3074 - Transaction Sponsorship & Batch Execution
- EIP-7022 - Execution Layer-Triggerable Validator Withdrawals
Later this month I will fully announce & start taking applications for the Pashov Audit Group security researcher internship.
Actual audit practice, paid (small but okay), a mentor to help you all & a chance to work @ Pashov Audit Group post-internship. Notifications on��
Pashov Audit Group security researcher internship coming soon. Learn by doing, 100% practice. Real audits, real projects.
Like/RT this post if you'd be interested in this. There will be lots of slots, I've thought of a scalable model to do this right, full announcement soon🫡
WazirX has been hacked for $230 millions
It seems their multisig wallet was upgraded to a malicious implementation which simply lets the attacker pull out all ETH and ERC20 funds from the multisig
The Fallback Extension Pattern
The Fallback Extension Pattern is a design strategy used in smart contract development to extend the functionality of a contract beyond its size limitations. This pattern leverages the fallback function to delegate calls to an extension contract, thereby enabling developers to incorporate additional functions without directly modifying the primary contract.
However, implementing this pattern necessitates modifying the primary contract to include the fallback function for seamless interaction with the extension contract.
One of its primary advantages of fallback extension is circumventing Solidity's 24KB contract size limit by offloading some functionalities to an extension contract, thus enabling more complex applications. This pattern also promotes modularity, allowing developers to separate different functionalities into distinct contracts, making the overall system easier to manage and understand. Additionally, it facilitates upgradeability by enabling new features to be added through extension contracts without altering the primary contract, thus maintaining stability and security while evolving the contract's capabilities.
Context Preservation and Accessing Shared State
When using delegatecall to forward calls from the primary contract to the extension contract, it's crucial to ensure that the context, including storage variables, is preserved. This context preservation ensures that the extension contract operates within the same state as the primary contract, maintaining consistency and integrity. The primary and extension contracts should access and manipulate shared state variables stored in the contract's storage. If the storage layout differs between the two contracts, accessing these shared variables may lead to unexpected behavior or data corruption. Inconsistencies in storage layout could result in data mismatches or storage collisions, where variables in one contract overwrite or interfere with variables in another contract. This can lead to erroneous contract behavior and potential security vulnerabilities.
Consider the example below: The SharedStorage contract holds all the storage variables. MainContract and ExtensionContract inherit from this contract, ensuring they share the same storage layout.
The MainContract inherits from SharedStorage and includes a fallback function to delegate calls to the ExtensionContract:
The ExtensionContract also inherits from SharedStorage and implements the additional functionality, such as withdrawing a specific amount:
Strategies for Achieving Identical Storage Layouts
One approach to achieving identical storage layouts is to consolidate all storage variables into a single contract shared by both the primary contract and extension contract. This ensures uniformity in storage layout and simplifies the management of shared state. Alternatively, developers can define storage structs or interfaces that encapsulate shared state variables. Both the primary contract and extension contract can reference these structs/interfaces to access the shared state, ensuring consistency in storage layout. Another strategy is to design contracts with storage layout compatibility in mind from the outset. Planning and documenting storage structures and variable placements help ensure consistency across contract upgrades and extensions.
When deploying and upgrading contracts that use the Fallback Extension Pattern, it is critical to ensure that any changes to the storage layout are reflected consistently across both the primary and extension contracts. This means that any new variables added to the storage must be appended to the end of the storage structure to avoid shifting existing variables.