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
Yul typically impairs the readability of the code, but I'm happy to give this idea a go (and see some optimization proposals).
Anyway - I'd classify this as effort: epic.
This issue is stale because it has been open 182 days with no activity. Leave a comment or remove the "stale" label, otherwise this will be closed in 14 days.
Keep it open for a few more months.