v2-core
v2-core copied to clipboard
Research on re-writing some functions in Yul to optimize for gas
Gas costs are relevant not only on Ethereum but on L2s as well. It can even influence the choice of the protocol by users. There is already an ongoing discussion for ideas on optimising contracts for gas.
Yul, being an intermediate language, offers more efficient gas management while interacting with smart contracts. Investigate functions and subroutines where Yul can be used to substitute Solidity without affecting the functionalities. Some of the areas that can be looked at:
- Mathematical operations
- Low-level calls
- Dynamic memory allocation. Ex. how Seaport returns contract name
- Storage management