# Architecture

TermPrime is built as a Daml application on the Canton Network. A few components work together to let institutions interact with it using the wallets and signing methods they already trust.

* **TermPrime app.** The application logic and backend that TermPrime builds. It defines the repo contracts and lifecycle and interacts with the network through the Ledger API.
* **Participant node.** A standard Canton component that hosts a participant's parties, stores their contracts, and submits signed messages to the network's synchronizer. TermPrime operates its own institutional-grade participant node, so participant data stays on infrastructure TermPrime runs rather than passing through a third party. The TermPrime app runs on top of this node.
* **Validator.** TermPrime runs its own validator (rather than relying on a shared one), which keeps each participant's data on the same node as the application for the best data locality, and supports an institutional operating posture.
* **Wallet & signing.** Through a wallet infrastructure provider (Dfns), institutions can interact with TermPrime using their existing wallets and familiar signing methods (such as passkeys). Keys are never handled by TermPrime directly; signing is performed on the user's side, and TermPrime maps each onboarded institution to its on-network identity after onboarding and verification.

In short: the **TermPrime app** runs on top of TermPrime's **participant node and validator**, while institutions connect and sign through their **own wallets** via the wallet provider, so participants keep control of their keys and identity while transacting on a shared, neutral venue.

### Architecture

#### 1. Canton Network and wallet layer

The Canton Network provides the foundational settlement and security layer. Rather than holding keys or taking custody, TermPrime lets each institution interact through its own wallet and familiar signing methods, provided through a wallet infrastructure provider (Dfns).

* Each institution controls the cryptographic keys behind its own *party*, the Canton identity (similar to an account or wallet address on other networks) that it uses to sign. These keys are never handled by TermPrime directly; signing happens on the participant's side, so no single party can act unilaterally on another's behalf.
* Transactions execute on the network only when the required parties have signed, which prevents unauthorized actions and keeps authorization with the institutions themselves.
* On Canton, every party is a registered, verifiable identity; there are no anonymous participants. On top of that, TermPrime runs as a permissioned application: only institutions that have been onboarded and verified can transact, so every counterparty on the venue is known and approved.
* TermPrime operates its own **participant node and validator**, so each institution's data stays on infrastructure TermPrime runs rather than passing through a shared third party, and the platform maintains an institutional operating posture on the network.

#### 2. TermPrime system

This is the core platform that orchestrates order matching and the loan lifecycle according to pre-set rules. It is the central hub for interactions on the venue: it publishes loan proposals, coordinates the lifecycle from origination through settlement, and produces records and notifications. Consistent with its neutral role, the TermPrime system facilitates matching and record-keeping; it does not take custody of assets, hold credit risk, or intervene in participants' risk decisions.

#### 3. Client web application

This is the interface through which borrowers, lenders, and other participants interact with TermPrime. It provides functionality for:

* Placing borrow and lend orders.
* Reviewing and signing loan proposals using the participant's own wallet.
* Completing settlement actions at maturity, on-platform or by registering an off-platform settlement.
* Viewing order status, contract details, transaction history, and notifications.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.termprime.finance/technology-and-infrastructure/architecture.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
