# Strategy: Sail Engine

The Sail Engine is an autonomous yield infrastructure that continuously routes capital, scores risk, and enforces profitability constraints across every supported chain. It manages cross-chain portfolios using a combination of statistical signal classification, analytic scoring, adaptive learning, and real-time cost integration.

The current production version is the V2 engine, which introduces spike-aware yield optimization, a dual-mode scoring system, an aggressive profitability gatekeeper, financial inertia for stability, and five-day horizon optimization.

***

**1. Yield Regime Classification**

DeFi protocols exhibit two fundamentally different yield behaviors, and the optimal response to each differs.

**Spikes** are transient, high-magnitude yield anomalies caused by liquidity events, incentive launches, or arbitrage opportunities. They typically decay within hours to days and demand rapid reallocation to capture value before mean reversion.

**Trends** are sustained yield movements reflecting fundamental changes in protocol economics, user adoption, or market conditions. They persist over weeks to months and warrant conservative, gradual repositioning to avoid unnecessary transaction costs.

The V2 engine uses a z-score based statistical classifier to distinguish spikes from trends in real time. For each candidate protocol, the engine computes the deviation of the current APY from its multi-horizon historical mean (1-day, 7-day, and 30-day baselines). Protocols whose z-score exceeds the threshold (z\* = 1.5, corresponding to approximately the 93rd percentile of the normal distribution) are classified as exhibiting spike behavior. All others are classified as trend behavior.

***

**2. Dual-Mode Scoring**

The detected regime determines how the agent weights current versus historical APY:

* **SPIKE mode (z > 1.5):** 80% weight on current APY, 20% on historical average. This prioritizes capturing the fleeting opportunity before it decays.
* **TREND mode (z <= 1.5):** 40% weight on current APY, 60% on historical average. This minimizes allocation variance while maintaining responsiveness to genuine shifts.

Each protocol receives a composite score that combines its regime-adjusted APY component with a TVL safety factor (logarithmic normalization against a $1B ceiling). The composite score is:

```
S_i = (Ã_i^α · T_i^β)^γ / Σ_j (Ã_j^α · T_j^β)^γ
```

Where (α, β, γ) are sensitivity parameters that adapt automatically to portfolio size. Larger portfolios receive higher sensitivity to liquidity depth and lower sensitivity to yield volatility, favoring deeper, more stable venues.

***

**3. Profitability Gatekeeper**

Before any allocation is optimized, V2 applies a profitability gatekeeper, a pre-optimization filter that rejects moves failing to meet payback requirements:

* **SPIKE moves** must pay back their total transaction cost within a single execution cycle (e.g., 6 hours for Silver tier, 1 hour for Platinum tier).
* **TREND moves** are allowed a 7-day payback horizon.

The gatekeeper uses real-time API-derived cost estimates (gas, slippage, bridge fees, swap fees) rather than static approximations. When live API data is unavailable, conservative fallback estimates are applied. Under proportional costs, payback time is independent of portfolio size.

Any move that cannot satisfy the payback criterion is rejected before it reaches the optimizer.

***

**4. Financial Inertia**

To prevent allocation ping-ponging between marginally different strategies, V2 introduces financial inertia, a mathematical stability bonus that rewards allocations similar to the current state. Any new allocation must offer expected returns exceeding the current allocation by a minimum hurdle proportional to the magnitude of the proposed change. This mechanism reduced unnecessary churn by 43% in testing while sacrificing only 0.8% of potential returns.

***

**5. Five-Day Horizon Optimization**

Traditional portfolio optimization assumes stable annual returns. In DeFi, APYs can fluctuate by 50% or more within days. V2 replaces annual return projections with a 5-day forecast horizon for two reasons:

* **User protection:** by requiring moves to be profitable within 5 days, the engine ensures that users who deposit and withdraw within reasonable timeframes will not experience negative returns from transaction costs exceeding yield gains.
* **APY volatility:** projecting returns beyond 5 days introduces excessive uncertainty given DeFi's non-stationary yield dynamics.

***

**6. Complete Objective Function**

The V2 optimization integrates all components into a single objective:

```
L(w) = R_5(w) - λ_C · C(w, w₀) + I(w, w₀) - η · D(w)
```

Where:

* R\_5(w) = five-day projected return (opportunity)
* C(w, w₀) = rebalancing cost (efficiency)
* I(w, w₀) = inertia bonus (stability)
* D(w) = diversification penalty (risk management)

The optimizer uses simulated annealing with a geometric cooling schedule, enabling escape from local optima while respecting per-chain position caps, network allocation constraints, movement restrictions, and profitability gates simultaneously. A CNN meta-controller provides learned priors for the sensitivity parameters (α, β, γ) from APY volatility history, reducing sample complexity and adapting the scoring function to prevailing market regimes.

***

**7. Real-World Performance**

Testing over 21 days during a low-yield market period (January 2026, approximately 6.7% baseline yields) demonstrated:

| Metric                                | V2 Result   |
| ------------------------------------- | ----------- |
| Mean APY                              | 7.5 to 8.0% |
| Profitable rebalancing decisions      | 95%         |
| Improvement over V1 baseline          | 25 to 33%   |
| Spike capture efficiency              | 80.2%       |
| Churn reduction via financial inertia | 43%         |
| Cost efficiency (gain/cost ratio)     | 7.1 to 8.4x |

Results were consistent across portfolio sizes from $2,000 (Silver tier) to $500,000 (Platinum tier), demonstrating scale independence.

***

**8. Learn More**

Read the full V2 paper: *Sail Optimization Engine V2: Spike-Aware Yield Optimization with Sonar Real-Time Risk Intelligence* (March 2026).

Read the V1 paper: [*Cross-Chain Optimization Engine for Autonomous Agents*](https://docsend.com/view/8qqn3qy5ijgg94zr/d/tsxt8ebabn9v6c7d)
