Skip to content
  • Rust
  • Security · prime brokerage verification

Aristotle proved the accounting behind Project 0's prime brokerage

Project 0 is a prime broker built on Solana. Aristotle checked the math behind deposits, withdrawals, borrows, repayments, and liquidations. It proved the books stay consistent no matter what order those happen in.

How the books stay consistent

Every deposit, borrow, withdrawal, repayment, or liquidation changes Project 0's records. Aristotle proved that three things still hold after each one, in any order, and after interest is added.

The records stay valid. Totals change by exactly the amount of each operation, no more and no less. And the value of a share never goes down.

Try Aristotle

The results

Project 0 Rust

Five operations, one set of books

Each operation has its own proof. A combined proof covers all five together.

  • 5

    Operations proved

  • 31

    Proved results

What Aristotle proved, by area:
AreaWhat’s proved
DepositThe amount is recorded and paid exactly, including how it rounds.
WithdrawalNormal and full withdrawals update the accounts correctly and pass every safety check.
BorrowThe loan, the debt, and any fees are recorded correctly.
RepaymentBoth ways of repaying reduce or close the debt correctly.
LiquidationA liquidation always leaves the account healthier, but never takes more than it needs to. Fees and all four accounting entries are included.
Joint accountingAcross any mix of operations and interest updates, the records stay valid, totals match every operation exactly, and share values never go down.

Each result lists the conditions it depends on.

Built on

  • Solana

What the proof covers

  • The program's own math

    Aristotle used the same fixed-width numbers and rounding as Project 0's code on Solana.

  • Any order

    Users can deposit, borrow, withdraw, repay, and get liquidated in any order, with interest added in between. The proof covers all of it.

  • What it assumes

    We proved this for Project 0's records as Aristotle modeled them. We didn't check that model against the live accounts on chain.

  • What it leaves out

    Token transfers, transaction rollback, memory limits, rate limits across transactions, the full flash-loan flow, and whether trades are profitable.

Find what your tests and audits miss

  1. 01

    Point Aristotle at your Rust program.

  2. 02

    Say what must always hold, or let Aristotle propose it.

  3. 03

    Get back every property, proved or refuted, with the conditions it rests on.

Try Aristotle