> For the complete documentation index, see [llms.txt](https://docs.tradealgoavs.sphenelabs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tradealgoavs.sphenelabs.com/the-protocol/trust-model.md).

# Trust Model

TradeAlgoAVS ensures that Operators:

* **Execute trades correctly** according to the strategy logic.
* **Do not have custody of user funds**.
* **Keep strategy logic confidential**.
* **Distribute fees based on the agreed subscription model**.
* Operators are **slashed** if:
  * They deviate significantly from the expected strategy performance.
  * They execute trades incorrectly or inefficiently.
  * They engage in front-running or exploitative behavior.

TradeAlgoAVS employs an **M-of-N aggregation model** where multiple Operators (quorum) execute the same strategy, and their **performance statistics are compared**.

The assumption is that:

1. **The same trading strategy, under identical market conditions, should yield statistically similar results within an expected standard deviation**.
2. **Investors (strategy users) do not care about the individual order-level execution but rather the final performance metrics (profit, ROI, drawdown, Sharpe ratio, etc.)**.

### Validation Workflow

#### Summary

1. **Multiple Operators execute the strategy independently**.
2. **Their trade performance metrics are compared**:
   * ROI
   * Profit percentage
   * Execution slippage
   * Risk scores (e.g Sharpe ratio)
3. Final aggregated results are submitted on chain.
4. **If an Operator's results deviate significantly** from the expected statistical range, they are:
   * **Flagged for fraud**.
   * **Slashed if proven malicious**.

#### Details

$$N$$ Operators independently execute the strategy, and their performance metrics are compared. Let $$X\_i$$ be the performance metric of Operator $$i$$. The mean of all Operator performances is defined as:&#x20;

$$
\mu = \frac{1}{N} \sum\_{i=1}^{N} X\_i
$$

The standard deviation:

$$
\sigma = \sqrt{\frac{1}{N} \sum\_{i=1}^{N} (X\_i - \mu)^2}
$$

It follows that the decision rule for rewards and penalties is:

$$
S\_i =
\begin{cases}
\text{Reward}, & \text{if } |X\_i - \mu| \leq \sigma \\
\text{Slash}, & \text{if } |X\_i - \mu| > \sigma
\end{cases}
$$

After removing outliers, the remaining valid Operator results are aggregated as:

$$
X\_{\text{final}} = \frac{1}{M} \sum\_{i=1}^{M} X\_i, \quad X\_i \text{ within } \sigma \text{ range}
$$

where $$M$$ is the number of non-outlier Operators that will get rewarded for honest and efficient task completion. $$M - N$$ is the number of Operators that will get slashed.&#x20;

## Goal

The **TradeAlgoAVS trust model** is designed to ensure that:

* Investors get **what they subscribed for** (verifiable performance).
* Strategy providers can’t **falsify results** or **steal funds**.
* Operators are **incentivized to act honestly** under a **strong slashing mechanism**.

This **hybrid on-chain/off-chain design** brings together the **best of web3 security** and **traditional finance execution** while preserving **privacy, transparency, and accountability**.
