> For the complete documentation index, see [llms.txt](https://docs.accountable.capital/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.accountable.capital/accountable-documentation/vault-as-a-service/architecture-overview.md). Agents can also search and read this documentation through its [MCP server](https://docs.accountable.capital/~gitbook/mcp).

# Architecture Overview

## Accountable Protocol Architecture Overview

<figure><img src="https://3032054753-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3cULuVMEbQOmkynE1mju%2Fuploads%2FLgv9JxPmThCtapPN1BIt%2Fimage.png?alt=media&amp;token=ec5c99c9-71fd-430a-a423-642d4bc1a13c" alt=""><figcaption></figcaption></figure>

### Overview

The core components described below are part of the Accountable Protocol, that aims to offer all the infrastructure necessary for building custom lending strategies, that is aided by the Data Verification Network in offering verifiable data about counterparties (`Borrowers`**,** `Loan managers,` etc.). Access to these products is made possible through a comprehensive UI that facilitates deployment of complex strategies easy and predictable, with real-time visual feedback.

### Core Components

#### 1. AccountableAsyncVault

* This contract is an extension of ERC-4626, which allows better operations control by implementing the ERC-7540 standard with a request-fulfill-execute pattern.
* It can either be a fully asynchronous setup, meaning both deposit and redeem operations are async or a partially asynchronous setup, with just the redeems/deposits being async.
* For most strategies, such as fixed/open-term loans, an asynchronous redeem vault is used, meaning that deposit/mint works the same as in standard ERC-4626 vaults, but redemptions are controlled by the underlying strategy state.
* It acts as a more sophisticated escrow, that allows accounting, custody and customization of shares and assets (i.e transfer throttling, soul-bound shares, authorization).

#### 2. AccountableWithdrawalQueue

* This is a component that ensures a FIFO withdrawal processing order.
* It's synced and controlled by the vault's internal accounting and can be operated standalone, in some strategies, or through the strategy according to the restrictions of that particular strategy.

#### 3. AccountableStrategy

* Base contract that holds all the state variables and base functionality for operating external modules and permissions - also allows for off-chain proofs publishing.
* Intended to be extended by a more complex strategy, that enforces a clear lending logic, but it can be used to manage a vault while relying on off-chain actions and trust.\
  \
  **Note**: official Accountable factories won't deploy such strategies by default.

#### 4. FixedTermLoan

* A strategy that enforces a fixed term loan logic, while acting as a standard vault, emitting shares and enforcing redemptions based on performance.
* It can act as a simple settlement between parties, with heavy gatekeeping, or be opened to retail capital that wants deterministic yield and terms.
* Fixed term in this context means end-of-term repayment of principal, periodic interest payments (that can be claimed while ongoing) and a fixed interest rate.

#### 5. OpenTermLoan

* A strategy that offers an open term type of loan, with looser restrictions compared to the fixed-term
* It features contiunous interest accrual, which can be updated alongside other parameters
* Payments can be made at fixed intervals or whenever the debt obligations exceed unfunded obligations such as withdrawal requests or reserve ratio thresholds.
* Redemptions are batched and can be requested periodically compared to the more rigid fixed-term which can have all redemptions locked until repayment.

#### 6. Access

* An access module embedded into `AccountableVault` configurable through the strategy
* Different levels of permissioning through `PermissionLevel`: `KYC`, `Whitelist` or `PermissionLess`

#### 7. SafetyModule

* An optional module that can be attached to a strategy when collateral is required
* Allows locking collateral, liquidations of delinquent loans (late interest payments) and default coverage in case a borrower defaulted on a loan.
* By employing this module a strategy essentially becomes similar to over-collateralized protocols in the sense that it provides some collateral backing and metrics (i.e LTV).

**Note**: Currently under developement.

#### 8. RewardsDistributor

* An optional module that allows the strategy to have rewards attached to boost the apy.
* It works with multiple tokens and claiming can be done independently from the underlying strategy's operations, by submitting merkle proofs when rewards are accrued and claimable.

#### 9. FeeManager

* A central module that handles fee collection from active strategies
* It is used to enforce per strategy fee rates and manager/protocol profit splits


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.accountable.capital/accountable-documentation/vault-as-a-service/architecture-overview.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
