Strategy
Sail’s optimization engine manages cross-chain portfolios using a balance of analytic scoring and adaptive learning.
Each agent runs a multi-factor function that scores all active markets by expected yield, liquidity depth, and volatility cost, then reallocates based on that score.
1. Scoring Function
Each protocol receives a normalized score based on yield, liquidity, and volatility:
S_i = (A_i^α * T_i^(βγ) * e^(-λσ * σ_i²)) /
Σ_j (A_j^α * T_j^(βγ) * e^(-λσ * σ_j²))where:
A_i= protocol APYT_i= liquidity (TVL)σ_i= historical volatilityλσ= risk adjustmentα, β, γ= sensitivity parameters that adapt to portfolio size
Larger portfolios automatically receive higher sensitivity to APY and liquidity risk, meaning big accounts favor deeper, lower-volatility venues while smaller ones chase lighter, higher-yield pools.
2. Cost Awareness
When the agent moves capital between chains or tokens, it models full cross-chain and swap costs:
c_(i→j) = μ_chain * [c_i ≠ c_j] +
μ_token * [t_i ≠ t_j] +
slippage_i(P) +
gas_(i→j) / PEach swap or bridge is treated as an “energy barrier.” The optimizer only crosses if the expected yield improvement outweighs that cost.
3. Optimization Objective
The agent searches for a new allocation w* that maximizes a regularized utility:
L(w) = wᵀS − λ_c * C(w, w₀)
− η * ||w − w_t||²
− ν * H(w)where:
C(w, w₀)= total cost to move from previous allocationH(w)= entropy term that prevents over-concentrationλ_c, η, ν= cost and diversification controls
The optimizer uses simulated annealing, gradually cooling search temperature to escape local minima and converge near an optimal allocation. A CNN meta-controller provides priors for (α, β, γ) based on volatility and APY history.
4. Learn More
Read the full paper: Cross-Chain Optimization Engine for Autonomous Agents
Last updated

