An arkworks implementation of the protocol described by V. Buterin in Having a safe CEX: proof of solvency and beyond.
The idea is to perform a proof of solvency of a centralized exchange (CEX) by proving that the CEX assets are greater than its liabilities. We implement two of the main working pieces:
- A polynomial
$P(X)$ , consisting of the users' usernames and balances is lagrange interpolated and committed to using KZG. Users will be able to verify that they have been included in this polynomial using a multi-opening proof.
- An auxiliary polynomial
$I(X)$ , whose main role is to allow the CEX to perform additional auxiliary multi-opening KZG proofs, all building up to show that the sum of the users' balances matches a declared total.
This repo feats an example, which you can run with:
cargo run --release --example kzg_solvency
For tests, run:
cargo test --release