Skip to content

Commit

Permalink
feat: symbiotic burner router integration (#516)
Browse files Browse the repository at this point in the history
  • Loading branch information
shaspitz authored Dec 2, 2024
1 parent 6df26e0 commit c3cf161
Show file tree
Hide file tree
Showing 16 changed files with 1,180 additions and 35 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@
[submodule "contracts/lib/openzeppelin-upgrades"]
path = contracts/lib/openzeppelin-upgrades
url = https://github.com/OpenZeppelin/openzeppelin-upgrades.git
[submodule "contracts/lib/burners"]
path = contracts/lib/burners
url = https://github.com/symbioticfi/burners
202 changes: 202 additions & 0 deletions contracts-abi/abi/MevCommitMiddleware.abi
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,19 @@
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "burnerRouterFactory",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "contract IRegistry"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "deregisterOperators",
Expand Down Expand Up @@ -199,6 +212,11 @@
"type": "address",
"internalType": "contract IRegistry"
},
{
"name": "_burnerRouterFactory",
"type": "address",
"internalType": "contract IRegistry"
},
{
"name": "_network",
"type": "address",
Expand All @@ -214,6 +232,16 @@
"type": "address",
"internalType": "address"
},
{
"name": "_slashReceiver",
"type": "address",
"internalType": "address"
},
{
"name": "_minBurnerRouterDelay",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "_owner",
"type": "address",
Expand Down Expand Up @@ -261,6 +289,62 @@
],
"stateMutability": "view"
},
{
"type": "function",
"name": "isVaultBurnerValid",
"inputs": [
{
"name": "vault",
"type": "address",
"internalType": "address"
}
],
"outputs": [
{
"name": "",
"type": "bool",
"internalType": "bool"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "isVaultBurnerValidAgainstOperator",
"inputs": [
{
"name": "vault",
"type": "address",
"internalType": "address"
},
{
"name": "operator",
"type": "address",
"internalType": "address"
}
],
"outputs": [
{
"name": "",
"type": "bool",
"internalType": "bool"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "minBurnerRouterDelay",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "network",
Expand Down Expand Up @@ -548,6 +632,32 @@
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "setBurnerRouterFactory",
"inputs": [
{
"name": "_burnerRouterFactory",
"type": "address",
"internalType": "contract IRegistry"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "setMinBurnerRouterDelay",
"inputs": [
{
"name": "minBurnerRouterDelay_",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "setNetwork",
Expand Down Expand Up @@ -613,6 +723,19 @@
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "setSlashReceiver",
"inputs": [
{
"name": "slashReceiver_",
"type": "address",
"internalType": "address"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "setVaultFactory",
Expand Down Expand Up @@ -652,6 +775,19 @@
],
"stateMutability": "view"
},
{
"type": "function",
"name": "slashReceiver",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "address"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "slashRecords",
Expand Down Expand Up @@ -945,6 +1081,19 @@
],
"stateMutability": "view"
},
{
"type": "event",
"name": "BurnerRouterFactorySet",
"inputs": [
{
"name": "burnerRouterFactory",
"type": "address",
"indexed": false,
"internalType": "address"
}
],
"anonymous": false
},
{
"type": "event",
"name": "Initialized",
Expand All @@ -958,6 +1107,19 @@
],
"anonymous": false
},
{
"type": "event",
"name": "MinBurnerRouterDelaySet",
"inputs": [
{
"name": "minBurnerRouterDelay",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
}
],
"anonymous": false
},
{
"type": "event",
"name": "NetworkRegistrySet",
Expand Down Expand Up @@ -1152,6 +1314,19 @@
],
"anonymous": false
},
{
"type": "event",
"name": "SlashReceiverSet",
"inputs": [
{
"name": "slashReceiver",
"type": "address",
"indexed": false,
"internalType": "address"
}
],
"anonymous": false
},
{
"type": "event",
"name": "Unpaused",
Expand Down Expand Up @@ -1539,6 +1714,33 @@
"name": "InvalidReceive",
"inputs": []
},
{
"type": "error",
"name": "InvalidVaultBurner",
"inputs": [
{
"name": "vault",
"type": "address",
"internalType": "address"
}
]
},
{
"type": "error",
"name": "InvalidVaultBurnerConsideringOperator",
"inputs": [
{
"name": "vault",
"type": "address",
"internalType": "address"
},
{
"name": "operator",
"type": "address",
"internalType": "address"
}
]
},
{
"type": "error",
"name": "InvalidVaultEpochDuration",
Expand Down
646 changes: 633 additions & 13 deletions contracts-abi/clients/MevCommitMiddleware/MevCommitMiddleware.go

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions contracts/contracts/interfaces/IMevCommitMiddleware.sol
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ interface IMevCommitMiddleware {
/// @notice Emmitted when the vault factory is set
event VaultFactorySet(address vaultFactory);

/// @notice Emmitted when the burner router factory is set
event BurnerRouterFactorySet(address burnerRouterFactory);

/// @notice Emmitted when the network is set
event NetworkSet(address network);

Expand All @@ -110,6 +113,12 @@ interface IMevCommitMiddleware {
/// @notice Emmitted when the slash oracle is set
event SlashOracleSet(address slashOracle);

/// @notice Emmitted when the slash receiver is set
event SlashReceiverSet(address slashReceiver);

/// @notice Emmitted when the minimum burner router delay is set
event MinBurnerRouterDelaySet(uint256 minBurnerRouterDelay);

/// @notice Emmitted when validator positions are swapped as a part of slashing
/// @dev Each array index corresponds to a swap instance. ie. all lists should be of equal length.
event ValidatorPositionsSwapped(bytes[] blsPubkeys, address[] vaults, address[] operators, uint256[] newPositions);
Expand Down Expand Up @@ -182,6 +191,10 @@ interface IMevCommitMiddleware {

error VaultDeregRequestExists(address vault);

error InvalidVaultBurner(address vault);

error InvalidVaultBurnerConsideringOperator(address vault, address operator);

error ValidatorNotInValset(bytes blsPubkey, address vault, address operator);

error NoSlashAmountAtTimestamp(address vault, uint256 timestamp);
Expand Down
Loading

0 comments on commit c3cf161

Please sign in to comment.