-
Notifications
You must be signed in to change notification settings - Fork 437
Native Bridge Supply Monitoring #148
Comments
@epociask since it's "help wanted", I'll be interested |
This is really interesting, and I can help |
@lakefishingman522 , @GildedHonour We're currently working with OP to get an integration between Pessimism and their indexer to support stateful lookups of system smart contract bridge events (deposits, withdrawals). We're gonna provide a more technical spec in the following specs that'll better highlight implementation details. In the meantime, feedback on the proposed pseudocode and heuristic above would be greatly appreciated 🙏🏻 |
#189 - Adds a native supply based invariant. No considerations are taken for withdrawal step (proven, finalized), resulting in larger diffs than expected since more withdrawal events have been indexed then have been fully accredited on L1. |
Noted |
ethereum-optimism/optimism#8160 adds the ability to do type filtering for withdrawal types |
Heuristic Description
A heuristic should exist that monitors for discrepancies between the locked ETH amount on the L1
OptimismPortal
and the unlocked amount on L2. This allows for deep introspection into the safety of the native bridge and allows chain operators to detect real-time anomalies.Consideration(s)
0x000
blackhole address or immobilizing it viaSELFDESTRUCT
operations that specify the calling contract as the beneficiary. This could result in potential discrepancies between the circulating supply on L2 and the locked supply on L1. Burns can also be trigged by anyone on theL2ToL1MessagePasser
contract to delete initiated withdrawal funds.There are a few ways to calculate variations of the l1 supply:
prospective - Compute using initialized withdrawals from L2
Intermittent - Compute using proven withdrawals on L1
literal - Compute using accredited withdrawals on L1
Each of these can be subtracted by either the deposit sum or the OptimismPortal contract ETH value to represent an L1 supply.
Pseudocode
The following pseudocode demonstrates a high level implementation for how to compute different native bridge supplies on both L1 and L2. Additionally, it showcases a lightweight heuristic analysis example.
The text was updated successfully, but these errors were encountered: