How immunefi-team/audit-comp-base-everest-contracts works
This repository contains Base’s Solidity protocol contracts and operational scripts. A useful high-level workflow is an L1 user initiating a deposit or withdrawal, with L1 portal and proof contracts coordinating with L2 message-passing and bridge contracts; fee and configuration contracts support system operation. The graph also preserves token bridging, dispute-game verification, and deployment as distinct capabilities. Most Solidity implementation files were not sampled, so inferred protocol relationships are shown as dashed edges without evidence paths; only the repository’s overall scope is documented in the README.
Main entry points: OptimismPortal2.sol Portal · DisputeGameFactory.sol Dispute game factory · AggregateVerifier.sol Aggregate verifier · SystemDeploy.s.sol System deployment
Components 20
L1 protocol
- Portal
src/L1/OptimismPortal2.sol - System config
src/L1/SystemConfig.sol - Resource metering
src/L1/ResourceMetering.sol - L1 messenger
src/L1/L1CrossDomainMessenger.sol
L2 protocol
- L2 messenger
src/L2/L2CrossDomainMessenger.sol - Message passer
src/L2/L2ToL1MessagePasser.sol - Fee vaults
src/L2/FeeVault.sol - Gas price oracle
src/L2/GasPriceOracle.sol
Proof system
- Dispute game factory
src/L1/proofs/DisputeGameFactory.sol - Anchor registry
src/L1/proofs/AnchorStateRegistry.sol - Aggregate verifier
src/L1/proofs/AggregateVerifier.sol - TEE verifier
src/L1/proofs/tee/TEEVerifier.sol - ZK verifier
src/L1/proofs/zk/ZKVerifier.sol
Cross-chain bridges
- L1 standard bridge
src/L1/L1StandardBridge.sol - L1 NFT bridge
src/L1/L1ERC721Bridge.sol - L2 standard bridge
src/L2/L2StandardBridge.sol - L2 NFT bridge
src/L2/L2ERC721Bridge.sol - Mintable tokens
src/universal/OptimismMintableERC20.sol
Operations
- System deployment
scripts/deploy/SystemDeploy.s.sol
Other components
- L1 user
Connections 17
- L1 user → Portal: initiates deposit
- Portal → System config: reads configuration
- Portal → Resource metering: uses metering
- Portal → Dispute game factory: checks dispute game
- Dispute game factory → Anchor registry: uses anchor state
- Dispute game factory → Aggregate verifier: verifies proofs
- Aggregate verifier → TEE verifier: dispatches verification
- Aggregate verifier → ZK verifier: dispatches verification
- Portal → L1 messenger: routes messages
- L1 messenger → L2 messenger: sends messages
- L2 messenger → Message passer: records withdrawal
- L1 standard bridge → L2 standard bridge: bridges tokens
- L1 NFT bridge → L2 NFT bridge: bridges NFTs
- L2 standard bridge → Mintable tokens: uses token
- Gas price oracle → Fee vaults: supports fee accounting
- System deployment → Portal: deploys protocol
- System deployment → System config: deploys protocol