Ethereum smart contracts
Deposit Contract(Ethereum): This contract is responsible for taking all the ETH and ETH derivative deposits from the users and storing the sharePrice. It passes the messages to Message Contract for passing of message. The deposit contract will look something like this:
Strategy Manager Contract: This contract is responsible for managing all the staking/restaking/BnL etc. strategies. It further helps in execution of the strategies. It looks something like the following:
Strategy Contracts(Ethereum): This contract is responsible for executing strategies on Ethereum on different protocols. Whenever a new protocol is whitelisted for staking, a new strategy contract is created and deposit contract delegates the calls to this contract whenever it has to interact with the protocol:
Messaging Contract: This contract is responsible for sending message from L1 to L2. It uses LayerZero and other messaging protocol to do so. The Messaging Contract looks like this:
The messaging contract uses following type Ids to know what kind of transaction it is:
Withdrawal Contract: This contract is responsible for creation of withdrawal queues and giving users their deposit back once the assets are withdrawn from strategies. It looks something like this:
Last updated