Overview
What is Pari?
Pari keeps the administrative agent's books for a syndicated loan on NEAR. The rules run in a NEAR contract and the books inside an Intel TDX enclave. The public chain sees one total and a fingerprint, and each party sees only its own.
A syndicated loan is one loan funded by many lenders. A bank acts as the administrative agent: it keeps the register of who holds how much, works out the interest each period, collects it from the borrower and passes each lender its share.
- Payments go wrong. In 2020 Citibank, as the administrative agent on Revlon’s loan, meant to pay about $7.8M of interest and wired about $900M of its own money instead. Loan agency still runs on email, PDFs and spreadsheets.
- A public blockchain can’t hold a loan’s books either. It would publish every lender’s position, every trade price and the borrower’s list of banned buyers (the DQ list).
What Pari does
- One step, to the cent. Every lender is paid in one step, to the cent. A short payment is shared pro rata, and the unpaid part is paid with the next period. See Payments and the two guards.
- Cash against loan. A trade settles cash against loan in one step, or not at all. See Trading and screening.
- Each party sees only its own. Each party sees only what it is entitled to. See Who sees what.
- One fact, and nothing else. A party can prove one fact from its own view to anyone, and show nothing else. See Prove one fact.
- No overpayment. The agent can’t overpay anyone, and the agent can be two of three operators. See The agent, two of three.
Two programs that check each other
| Where it runs | What it does | |
|---|---|---|
| The rules contract | ledger.paridesk.testnet, source in near/contract | Checks who may do what, runs one action at a time, holds the test USDC and caps every payout. |
The books (pari-core) | An Intel TDX enclave on OutLayer, source in near/enclave | Keeps positions, cash, trade prices and the DQ list in encrypted storage, and applies the deal’s rules. |
After every action the enclave hands back a fingerprint of the new books and, for each party, one sealed envelope, encrypted so only that party can open it, and one commitment: a salted hash of the facts inside that envelope. The contract stores all three. The public chain sees rules, totals, fingerprints and hashes. Each party opens its own envelope and sees its own slice.
How the pieces fit
a party ──signs a NEAR tx──▶ the rules contract (ledger.paridesk.testnet)
│ who may do what, one action at a time
│ caps every payout
▼
the books (Intel TDX enclave on OutLayer)
│ positions, cash, trade prices, the DQ list
│ applies the deal's rules, or refuses
▼
the public chain keeps ◀──── a fingerprint, the public totals, and
one sealed envelope and one commitment per party
each party ──its own key──▶ opens its own envelope, and sees its own sliceHow an action runs follows one action through all nine steps. To see it for yourself, start with Check it yourself: two of its commands need no account and no keys.