A trustless replacement to the Lido Accounting Oracle, powered by ZK. In particular, we calculate the following statistics every 225 epochs:
- clBalancesGwei: cumulative balance of all Lido validators on the consensus lay
- numValidators: the number of Lido-participating validators on consensus layer that ever appeared (deposited + activated)
- numExitedValidators: the number of Lido-participating exited validators on the consensus layer that ever appeared
The circuit is built using the plonky2x proving system and system is deployed end-to-end with Succinct. You can explore the generated proofs here.
For more details, refer to the original grant proposal that was submitted to the Lido DAO.
To run the test locally, set CONSENSUS_RPC_URL
to a mainnet consensus node and run the following command:
RUST_LOG=debug cargo test test_circuit --release -- --nocapture
To deploy the contract onchain:
cd contracts
CHAIN=11155111 bash script/deploy.sh
To send an example request to the contract:
cd contracts
bash script/request.sh
To run the operator:
cd operator
cp .env.example .env
yarn install
yarn build && yarn cli run <config-name>
Config is located at operator/src/config.ts
More details coming soon!
Contract Address: 0x9cdc0f1619558a1cdd179221ffe0c3fdfc472a15
Fulfill Transaction: 0x46e4de7a5be7f8dc2b1d93b3b864226b11bca8af7d2efcf4ea861b7f432865e7
Contract Address: 0xfD8e3773181Ca832FE0283383277a108609E3E8b
Fulfill Transaction: 0xf0858e2180170a3b9b7fe31f09648e2d4544590be3eaca0ca8e14c1c00d1b341
This code has not yet been fully audited, and should not be used in any production systems.