WHITEPAPER: GatewayAgente

Crypto-Economic Infrastructure and Decentralized Firewall for Trading Agents in DeFi

1. Executive Summary

Crypto automation is stuck in a paradox. Serious capital does not trust bots, copy trading or “DeFi managers” because there is always someone with discretionary power over withdrawals, risk and reporting. At the same time, the few people who actually have winning strategies do not want to expose their code, nor take on the regulatory and operational burden of managing other people’s money.

GatewayAgente breaks this deadlock by turning any trading agent into a closed‑mandate decentralized fund. Capital is held in a non‑custodial Smart Vault that enforces absolute loss limits (Hard Floor) and only executes trades within a DAO‑curated whitelist of tokens, swaps and protocols. The strategy lives inside a black‑box container identified by a cryptographic hash, is validated by a decentralized backtesting network (Proof of Backtest), and earns on‑chain performance fees without ever revealing its code or alpha.

The result is new financial infrastructure: investors get institutional‑grade downside protection and predictable mandates; developers run capital like a fund manager, at global scale, with no custody, no backoffice and no forced disclosure. The chain enforces, line by line, what can and cannot happen to the money.

2. The Problem: Bots, Copy Trading and the Trust Fallacy

The dominant automation models today all rely on implicit trust:

This creates a bad game for both sides.

For investors:

For strategy developers:

What is missing is not “another bot platform”. What is missing is infrastructure that makes theft impossible by design, track‑record fraud pointless, and consistent behavior directly rewarded at protocol level.

3. Core Architecture: Closed‑Mandate Vault + Black‑Box Agent

GatewayAgente is built on a radical separation of concerns: capital never sees the code, and code never touches the capital.

3.1. The Vault (the Hand)

The Gateway Vault is a non‑custodial smart contract that:

In practice, the Vault behaves like a closed‑end fund encoded in Solidity: once the agent, time horizon, safety floor and investable universe are set, nobody — not the protocol, not the developer, not even the investor — can violate those rules. Non‑conforming transactions simply revert.

3.2. The Agent (the Brain)

The Agent is an immutable container that:

The channel between Brain and Hand is a single, narrow function with a few parameters that the Vault can fully validate and locally simulate before accepting or rejecting.

[Execution Flow]
1. Agent → Produces an Intent with constrained parameters
2. Agent → Signs the Intent with key K
3. Vault → Verifies signature, mandate, Hard Floor and token/protocol whitelist
4. Vault → Routes to the corresponding DEX Adapter and executes if all checks pass

4. Closed Mandate: Time, Target, No Early Withdrawals

Every Vault is born with an explicit mandate that defines the rules of the game from day zero to settlement.

4.1. No early withdrawals

In GatewayAgente:

This removes two common failure modes: liquidity runs triggered by fear during drawdowns, and performance‑fee gaming via opportunistic redemptions right after a lucky spike.

4.2. Hard Floor: absolute loss limit

On top of the temporal/economic mandate, the Vault stores a Hard Floor in absolute value:

Loss limits stop being a moral commitment and become a mathematical property of the system.

5. Strategy Drawdown: Room to Play Without Breaking

No serious strategy exists without drawdowns. The right question is not “can we avoid losses?” but “how much pain is acceptable before we define ruin?”.

GatewayAgente separates two layers of protection:

During Proof of Backtest:

On live capital, the Vault can track local peaks, realized drawdowns and automatically pause a strategy that drifts outside its tested envelope.

6. Immutable Agents: Container Hash as Strategy Identity

The mechanism that turns “a set of scripts” into a reusable on‑chain asset is the notion of the agent as an immutable artifact.

6.1. Formal definition

An agent A in GatewayAgente is defined by the pair (H, K):

On‑chain, the protocol does not need to know anything about the code. It only needs to ensure that:

Any code change — from minor tweaks to full rewrites — produces a new hash H’, and therefore a new agent. There is no such thing as a “silent update” under the same identity.

6.2. Minimal container interface

Operationally, every agent container exposes a minimal, standard interface, for example:

Inside the black box, the developer is free to use any blend of models, heuristics or signals. Outside, the protocol sees a simple object that can be checked against vault limits and the global whitelist of assets and protocols.

7. Proof of Backtest: Decentralized Black‑Box Validation

To prevent both strategy theft and marketing games, agent approval in GatewayAgente does not rely on trust in a single entity, but on a decentralized, reproducible backtesting process.

7.1. The backtesting network (DON)

The protocol defines a network of specialized simulation nodes — a backtesting DON — which:

Each node then applies a local simulation of the Vault:

7.2. Approval consensus

If, after simulation:

each node issues an approval vote. Once a quorum is reached, the DON produces an aggregated signature over a summary message (e.g. “agent (H, K) approved for asset classes X, Y, Z with horizon T and drawdown budget D”).

This signature is submitted to an on‑chain AgentRegistry contract, which verifies the cryptography, checks quorum and governance rules, and records (H, K) as an approved agent with its risk profile. From that point forward, any vault is free to opt into that agent — within the approved bounds — without having to trust marketing slides or unverifiable track records.

7.3. Data requirements and vault simulation for backtesting nodes

Running a backtesting consensus node in GatewayAgente is not just about providing CPU cycles. Nodes must be able to reproduce, as faithfully as possible, how the agent would behave if it were trading on-chain.

To be eligible for random committee selection, a node must:

For each randomly assigned window, a node:

In other words, backtesting nodes do not just “look at signals”; they emulate the full lifecycle of the strategy interacting with a Vault under standardized market data.

7.4. Honest disagreement vs. misbehavior

Backtesting committees are designed to tolerate honest disagreement. A node may vote against approval even if most others vote in favor, simply because the random windows it was assigned produced worse outcomes for the strategy. That is not misbehavior; it is precisely the kind of diversity the protocol wants.

Slashing and penalties are therefore reserved for technical faults or provable dishonesty, such as:

A node that honestly reports “this agent lost money or stressed its drawdown budget in my sample” should not be punished for disagreeing with the majority. Instead, the aggregation logic focuses on whether the agent’s behavior is acceptable across a wide distribution of random tests, not on forcing all nodes to agree on a single number.

8. DAO Governance: Risk Curation and Protocol Evolution

GatewayAgente is designed to gradually hand over risk and integration decisions to a Decentralized Autonomous Organization (DAO). The DAO acts as an on‑chain risk committee, defining the action space available to vaults and agents.

8.1. Global whitelist of tokens, swaps and protocols

The DAO controls a global permission registry that specifies:

No vault may hold exposure to an asset that has not been approved. If a token is later removed — for example, due to a security incident — vaults are only allowed to unwind or reduce exposure, never to increase it. The whitelist effectively acts as a collective on‑chain risk officer for the entire ecosystem.

8.2. Global risk parameters

Beyond whitelists, the DAO configures system‑wide risk parameters such as:

8.3. Backtesting network and validator governance

The DAO is also responsible for:

9. On‑Chain Leaderboard and Developer Incentives

For GatewayAgente to become the default infrastructure for serious strategists, it must be the most rewarding place to publish a strategy. That means transparent reputation and a business model that pays for consistency, not just for volatility.

9.1. Real‑PnL leaderboard

Because every vault operation is on‑chain, GatewayAgente can support a public, tamper‑proof leaderboard. For each agent (H, K), analytics can display:

The primary leaderboard only counts completed mandates. Backtests and live‑but‑unfinished vaults can be shown in separate views, but never drive the main ranking.

9.2. On‑chain performance fees: developers as decentralized fund managers

Every vault run by an agent charges a performance fee on profits above the high‑water mark, set at vault creation. At the end of the mandate:

For a developer, each approved container effectively becomes a fund: any allocator can spin up a vault with that agent, within its risk envelope, and performance fees flow directly and programmatically.

9.3. Developer‑owned vaults: skin in the game

GatewayAgente explicitly encourages strategy creators to allocate their own capital into vaults powered by their agents. This creates a visible skin in the game signal:

Leaderboards can show how much of an agent’s total AUM is creator‑owned, and how those co‑invested mandates have performed.

10. Comparison with Traditional Models

Summarized:

11. Roadmap

The initial roadmap is deliberately pragmatic:

The target is unambiguous: to make GatewayAgente the default way to turn strategies into decentralized funds — with mathematical safety, clean incentives and reputations written directly on-chain.