# Overview

TradeAlgoAVS is a DEFAI project allowing each trader to scale into a hedgefund without taking custody of investors' money.

[**TradeAlgoAVS** is a DEFAI project](https://tradealgoavs.sphenelabs.com/) spawned at [EthGlobal's Agentic virtual hackathon](https://ethglobal.com/showcase/tradealgoavs-a4pq6) in February 2025. TradeAlgoAVS or Agentic Trading is a decentralized **noncustodial hedge fund platform** where users can create and subscribe to **trading strategies** without transferring custody of their funds. Strategy providers monetize their strategies while keeping their proprietary code confidential, as execution is handled by a network of **off-chain Operators**.

Operators can be **any computational instance** capable of executing strategies securely and correctly. To ensure efficiency and reliability, we have spun up **AI Agent Operators** built from **Custom Templates hosted on Autonome**, which autonomously execute trading strategies as defined by strategy providers.

Leveraging **EigenLayer's AVS framework**, **TradeAlgoAVS** achieves **trust-minimized execution** and **on-chain verifiability**, with **EigenLayer restaking** securing the network.

TradeAlgoAVS allows:

1. Successful traders to scale their strategies into hedge fund-like structures without taking on the liabilities of managing client funds.
2. Investors to allocate funds to self-curating, on-chain-verified trading strategies based on performance statistics.
3. Coders and AI engineers to design and develop autonomous trading agents and earn commission.
4. Supporters to stake on operators and participate in the network’s security and growth.


# Traditional Hedgefund vs DEFAI Fund

### Comparison: Traditional Hedge Funds vs. TradeAlgoAVS

Unlike traditional hedge fund, TradeAlgoAVS allows investors to still invest in both the crypto market as well as the traditional finance stock market without needing to transfer their assets to the fund manager or strategy operators.

| Feature                   | Traditional Hedge Fund                             | TradeAlgoAVS                                                     |
| ------------------------- | -------------------------------------------------- | ---------------------------------------------------------------- |
| **Custody of Funds**      | Users must transfer assets to the fund manager.    | Users retain full control of their assets.                       |
| **Strategy Transparency** | Investors blindly trust the hedge fund’s strategy. | Strategies remain private but validated via statistical proofs.  |
| **Execution Model**       | Trades executed by centralized entities.           | Trades executed by decentralized Operators, including AI Agents. |
| **Fees & Access**         | High fees, often locked for long periods.          | Competitive fees, full transparency, and no lock-up periods.     |
| **Investor Protection**   | Requires trust in fund managers and regulators.    | On-chain validation ensures fair execution.                      |

<br>


# Key Functionalities

The key functionalities of TradeAlgoAVS includes:

1. Decentralized & Non-Custodial Trading Strategies

* Users retain full control over their assets.
* Strategy providers monetize their algorithms without revealing their proprietary code.
* Execution is performed by off-chain Operators, including AI agents hosted on Autonome.

2. Trust-Minimized Execution & On-Chain Verification

* Operators stake funds and are slashed for malicious behavior.
* Trading execution is validated using M-of-N statistical aggregation.
* Fraud-proof mechanisms detect deviations from expected performance benchmarks.
* The goal is to implement WYSIWYG literally what you see when you click subscribe in terms of strategy expected performance statistics should be what you get consistently in the long run.

3. Self-Curating Autonomous Strategies

* Strategies are on-chain verified based on real-time performance statistics.
* Poor-performing strategies are naturally filtered out.
* Strategy providers must backtest and paper trade before publishing.


# The Protocol

TradeAlgo AVS protocol is built on Eigen Layer.

<figure><img src="/files/eVaDsqC42WoeNz8K4YUR" alt=""><figcaption></figcaption></figure>


# Task Definition

The **Trading Algo AVS (Agentic Trading) protocol** models each trading strategy execution as a **task**. A task *T* is represented as a triplet:

$$
T(s,u,m)=(strategy S,investor I,market M)
$$

where the market *M* is defined by:

$$
M(p,t)=(symbols,timeperiod)
$$

To simplify, for stock market, time period $$t$$ can be set as one trading day. When an **investor** $$I\_i$$**​** subscribes to a **strategy** $$S\_i$$, a task $$T\_i = (S\_i, I\_i)$$ is created for each trading day. So if there are ***n*****&#x20;active subscriptions** at start of the trading day, there will be ***n*****&#x20;tasks** generated daily.

Each operator will be responsible for the task they pick up, place orders as described by the strategy and computing its performance statistics at the end of the trading period to submit as the task output. The statistics chosen as the output of a task is:

* **Return on Investment (ROI)**
* **Profitability**
* **Risk Metrics**

### Task Workflow

1. Strategy provider submits a strategy (codes saved in secret vault and hash registered on chain).&#x20;
2. Subscribers choose strategies and sign a fee agreement on chain.&#x20;
3. AI Agent Operators on Autonome fetch execution signals and trade on behalf of subscribers.
4. Operators submit signed execution proofs on chain.&#x20;
5. Aggregator aggregates task outputs of similar strategy and submit aggregated statistics of each strategy on chain.


# 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**.


# Technology & Partners

TradeAlgoAVS relies on the following technologies and partners. Thank you!

Huge thank-you's to the following organizations for their technology and sponsorship!

[![Alchemy](https://github.com/ahsueh1996/TradeAlgoAVS/raw/main/partners/alchemy.png) ](https://www.alchemy.com/)[![Autonome](https://github.com/ahsueh1996/TradeAlgoAVS/raw/main/partners/autonome.png) ](https://dev.autonome.fun/autonome)[![CDP](https://github.com/ahsueh1996/TradeAlgoAVS/raw/main/partners/cdp.png) ](https://docs.cdp.coinbase.com/cdp-apis/docs/welcome)[![EigenLayer](https://github.com/ahsueh1996/TradeAlgoAVS/raw/main/partners/eigenlayer.png) ](https://docs.eigenlayer.xyz/)[![ETHGlobal](https://github.com/ahsueh1996/TradeAlgoAVS/raw/main/partners/ethglobal.png) ](https://ethglobal.com/)[![Google Cloud Platform](https://github.com/ahsueh1996/TradeAlgoAVS/raw/main/partners/gcp.png) ](https://cloud.google.com/)[![Nillion](https://github.com/ahsueh1996/TradeAlgoAVS/raw/main/partners/nillion.png)](https://docs.nillion.com/)


