> For the complete documentation index, see [llms.txt](https://riskguard-1.gitbook.io/riskguard-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://riskguard-1.gitbook.io/riskguard-docs/whitepaper/06-architecture-security.md).

# 6. Architecture & Security

> RiskGuard is read-only by design. It never takes custody of funds and never requests permission to move them.

RiskGuard's relationship with a user's wallet is strictly observational. The application reads on-chain state to detect and score positions. It does not request token approvals, it does not initiate transactions, and it never holds user funds. Authentication is performed through message signing — Sign-In with Ethereum for EVM wallets and Ed25519 signature verification for Solana wallets — which proves wallet ownership without granting any spending permission.

## Technical stack

| Layer                | Technology                                                    |
| -------------------- | ------------------------------------------------------------- |
| Frontend             | Next.js, React, TypeScript, Tailwind                          |
| EVM wallets          | wagmi + viem + RainbowKit                                     |
| Solana wallets       | Solana Wallet Adapter (Wallet Standard)                       |
| Backend              | Node.js + Express + TypeScript                                |
| Data                 | PostgreSQL + Redis                                            |
| RPC & data providers | Helius (Solana), Alchemy (EVM), DeFiLlama, security-data APIs |
| Notifications        | Email (Resend) + Telegram                                     |

## Reliability engineering

Reading live blockchain state reliably at scale requires careful engineering. RiskGuard incorporates several reliability mechanisms developed in response to real-world failure modes:

* **Request coalescing** — concurrent requests for the same wallet are merged into a single in-flight computation, preventing redundant load and race conditions.
* **Non-decreasing confirmed cache** — a detection result is only allowed to replace a prior result if it accounts for at least as many positions, preventing transient RPC failures from causing positions to flicker out of view.
* **Automatic retry with backoff** — flaky RPC calls are retried with exponential backoff before falling back to the last known good result.
* **Transaction-history fallbacks** — where direct enumeration is limited by RPC providers, historical transaction analysis is used to recover positions.

{% hint style="success" %}
**Security posture.** The combination of read-only access, signature-based authentication, and no custody of funds means that connecting to RiskGuard carries none of the smart-contract risk associated with granting token approvals. The worst-case data exposure is the public, on-chain contents of a wallet the user has chosen to connect.
{% endhint %}


---

# 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://riskguard-1.gitbook.io/riskguard-docs/whitepaper/06-architecture-security.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.
