ikigai-labs-xyz / DeFi-Circuit-Breaker-EIPs

The Ethereum Improvement Proposal repository
https://eips.ethereum.org/
Creative Commons Zero v1.0 Universal
3 stars 2 forks source link

Scroll OO Issue #4 - gas optimtize the latest circuit breaker implementation #14

Open valeriofichera opened 11 months ago

valeriofichera commented 11 months ago

Description

The goal of of this issue is to gas optimtize the latest circuit breaker implementation

Circuit Breaker Contracts follow the ethos of the development under EIP-7265 -> https://ethereum-magicians.org/t/eip-7265-circuit-breaker-standard/14909

Requirements

Gas-optimize latest circuit breaker implementation

Reduce usage of storage variables Favourably: Remove storing mappings in nested structs in storage

If further resources or support needed, feel free to contact the team on Discord

Stack

Solidity Understanding of Circuit Breakers: https://github.com/DeFi-Circuit-Breaker/EIPs/blob/core-overhaul/EIPS/eip-7265.md Pull Request Structure

Title and description: The pull request title and description should be clear and concise, and should accurately describe the changes that are being proposed. Code: The code in the pull request should be well-written and easy to understand Tests: The pull request should include any type of testing for all new code. Documentation: The pull request should be documented, so that other developers can understand what the changes do and how to use them. technical reference: https://github.com/DeFi-Circuit-Breaker/EIPs/blob/core-overhaul/EIPS/eip-7265.md

More information on the hack: https://whimsical.com/flashloan-hundred-finance-hack-12DMNCLmS4dDwV59jR5jU5 https://rekt.news/hundred-rekt2/ https://blog.hundred.finance/15-04-23-hundred-finance-hack-post-mortem-d895b618cf33 https://www.numencyber.com/hundred-finance-exploit-7-million/ https://github.com/SunWeb3Sec/DeFiHackLabs/blob/main/src/test/HundredFinance_2_exp.sol https://twitter.com/peckshield/status/1647307128267476992 https://twitter.com/danielvf/status/1647329491788677121 https://twitter.com/hexagate_/status/1647334970258608131

estimated time effort: Low (+2h)