Concepts

Parties and roles

Eight named accounts take part in the demo deal. Each one signs its own actions and opens only its own envelope.

PartyAccountRole
AgentagentFixes the rate, requests interest, settles each payment and settles each trade. Sees the whole register, and never the DQ list itself.
BorrowernorthwindPays each interest request with one token transfer, and keeps the DQ list. Sees the register and every trade, and never a trade price.
Lendersalder, birch, cedarFund the loan: 50,000,000.00, 30,000,000.00 and 20,000,000.00 of a 100,000,000.00 facility. Each sees its own position, payments, cash and trades.
Buyersdelta, rivalBuy into the loan from a lender. In the demo the borrower puts Rival on the DQ list, and Rival is told “not settled” and no reason.
AuditorauditorFollows the register through every payment and trade, with figures it can recompute. Never sees a trade price or the DQ list.

Each account sits under paridesk.testnet. Who sees what has the full table of what each reader sees, and what the public chain sees.

Named accounts for every role

The agent is agent.paridesk.testnet, a lender is alder.paridesk.testnet. The contract’s role checks and the enclave’s views are keyed by names a person can read.

The agent administers, and cannot overpay

The agent types the total it means to request. The enclave works the total out from the register, and if the two differ it refuses and says so. The contract never lets lenders be credited more than the borrower paid in for that request, and never pays out more test USDC than it holds for the deal. See Payments and the two guards.

A real agent desk does not act on one person’s word, and on a chain it should not act on one key. On NEAR an account can be a contract, so the deal’s agent can be a Sputnik DAO with three operators, of whom two must approve. See The agent, two of three.

A party acts for itself

The contract vouches for who called, and the enclave decides whether the caller is entitled. Only the holder can offer its position, only the named buyer can accept, and only the agent can settle the trade. A withdrawal always pays the caller from the caller’s own balance. The authority matrix lists every call and the test that holds it.

The contract’s owner

The owner (paridesk.testnet) loads the deal once, and can release the lock if a callback is lost. It cannot read the books, move money, act as the agent or set the fingerprint: only the enclave’s answer to the contract’s own request does that.

An account outside the deal

A buyer has to register a view key before it holds anything, so the contract lets any account register one, offer or accept a trade, pay test USDC in, or ask for a withdrawal. An account outside the deal can’t read the books or move anyone’s money: its offers and acceptances are refused, a withdrawal pays out only test USDC it paid in itself, and its envelope holds the deal’s public terms and nothing of anyone else’s. It can slow the deal down. A production deal would have the agent admit an account before it can call; that is not built.

Your own seat

On /you a visitor takes a seat with an account only they control: a NEAR testnet account named by a key. The visitor’s browser holds the signing key and the view key, and the demo server never holds either. The visitor buys 250,000.00 of the loan from Alder, and opens the envelope in the browser with a view key that never leaves it.