EigenLayer allows for EOAs and smart contracts to be AVS operators in their system. The Puffer protocol opts for the latter by introducing RestakingOperator
contracts to handle EigenLayer interactions. This reduces the trust placed in the operators, as the RestakingOperator
contract controls AVSs selections.
Upon contract initialization, the RestakingOperator
contract registers as an operator with EigenLayer's DelegationManager, allowing PufferModule
contracts to delegate to it.
All RestakingOperator
contract functions are restricted to the PufferModuleManager contract, giving the DAO control over which AVSs the operator can partake in.
EigenLayer uses EIP-1271 to allow contracts to "sign off" on AVS registrations. The flow for a
RestakingOperator
contract to opt in to an AVS is as follows:
- DAO selects the EOA of the operator, decides the message to be signed (e.g., opt into an AVS), and computes the digest
- DAO calls
PufferModuleManager
to forward the call toRestakingOperator
PufferModuleManager
callsupdateSignatureProof
to record the digestAVSDirectory
callsisValidSignature
to verify EIP-1271 signature.
Sets a digest for EIP-1271 signature
Called by the AVSDirectory
to verify an EIP-1271 signature