> For the complete documentation index, see [llms.txt](https://docs.syndromics.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.syndromics.xyz/architecture/off-chain-services.md).

# Off-chain services

Everything off-chain in Syndromics is either open source and runnable by anyone, or holds no protocol authority. The contracts are the source of truth; the services make them usable.

## Relayer

The relayer is the public order book of unsettled offers and borrow requests.

| Property    | Detail                                                                                                                    |
| ----------- | ------------------------------------------------------------------------------------------------------------------------- |
| Form        | Stateless REST and WebSocket service                                                                                      |
| Stores      | Signed offers, borrow requests                                                                                            |
| Validates   | Signature, expiry, nonce state, maker balance and allowance (or vault balance), eligibility, term and token compatibility |
| Serves      | Filtered views by token, tier, term, APR, LTV; matching suggestions for a request                                         |
| Authority   | None. Every offer is re-verified on-chain at settlement.                                                                  |
| Who runs it | Syndromics Labs runs one; anyone can run another. The order book is reconstructible from signed messages.                 |

### Relayer API

```
POST /v1/offers                 submit a signed offer
DELETE /v1/offers/:hash         soft-delete (the on-chain nonce cancel is authoritative)
GET  /v1/offers?token=&tier=&term=&maxApr=&minLtv=
POST /v1/requests               submit a borrow request
GET  /v1/requests/:id/matches   proposed syndicate for a request
GET  /v1/book/export            full dump of live offers and requests
WS   /v1/stream                 live offer and request updates
```

The `export` endpoint is a transparency commitment: the whole book can be pulled and mirrored at any time.

## Indexer

An event-sourced view of the protocol, built on Ponder (self-hosted, TypeScript) or Envio HyperIndex over chain 4663.

* Feeds the loan explorer, the risk page, borrower and lender dashboards.
* Is the source of truth for keeper bots.
* Mirrors the relayer book so the order book survives any single relayer outage.
* Exposes a public GraphQL endpoint.

## Keepers

Open-source bots, incentivised by liquidation fees where applicable. Anyone can run them.

| Bot                     | Trigger                                             | Action                                                    |
| ----------------------- | --------------------------------------------------- | --------------------------------------------------------- |
| Margin alert            | HF below 1.10                                       | Notify borrower through configured channels               |
| Auction kick-off        | HF below 1.00 or loan Defaulted, no sequencer grace | Call `startAuction`; earn the keeper share                |
| Refinance acceptor      | Refinance auction rate reaches a lender's limit     | Submit the lender's pre-signed acceptance                 |
| Idle-capital rebalancer | Vault liquidity or lender preference changes        | Deposit or withdraw through the adapter                   |
| Oracle watch            | Move cap, pause flag, staleness                     | Surface market pauses to the front-end and alert channels |

## KYC service

A third-party provider (Sumsub or Persona class, with a zero-knowledge option) that:

1. performs identity, sanctions and residency checks,
2. issues an EAS attestation to the user's wallet for the appropriate role,
3. renews or revokes attestations on re-screening.

Personal data never touches the chain. The attestation carries only the role, the jurisdiction class and an expiry. See [Eligibility registry](/architecture/eligibility.md).

## Front-end

* Next.js with viem, served at `/platform` on syndromics.xyz.
* Privy for sign-in and embedded wallets on Robinhood Chain; gasless EIP-712 signing of offers and requests.
* Supabase as the shared order book and loan registry, with row-level security keyed to the Privy user.
* Views: overview, borrow, lend (order book and offer management), positions, explorer, settings.

The front-end holds no keys and no authority. Anything it shows can be verified against the indexer or the chain directly. See [Platform](/architecture/platform.md) for the implementation.

## Alerts

Borrowers can register alert channels (email, push through the wallet, webhook) with the keeper service. Alerts fire on HF warning, approaching maturity, refinance auction progress, market pause and parameter changes affecting their loans.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.syndromics.xyz/architecture/off-chain-services.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
