Álvaro Alonso

Lead Engineer · Intelligence Layer at Sail

Quantitative DeFi · risk monitoring · cross-chain yield optimization

Madrid, Spain · open to remote / EU

~$650M
routed in 6 months
~200
users
~$600k
TVL
2 + 2
papers · reports

Sail · Lead Engineer, Intelligence Layer · Nov 2024 – present

I founded the intelligence layer at Sail — a DeFi yield-optimization protocol on Base and Arbitrum — from a blank page. Two production systems, both designed and implemented end-to-end: the cross-chain optimization engine that decides where user capital sits, and Sonar, the risk-monitoring system that decides what to avoid. I also defined the database schema and built the first user-facing UIs.

Leadership. Presented the intelligence layer to venture investors during fundraising rounds, owned the technical narrative for the engine and Sonar in those conversations, and led roadmap discussions with the CEO on direction and trade-offs.

Cross-chain optimization engine

Formalized portfolio allocation as a constrained Markov Decision Process. Non-convex objective (yield, transaction cost, slippage, concentration risk) optimized via simulated annealing with Metropolis-Hastings acceptance. A CNN meta-controller predicts the annealing hyperparameters from APY/TVL history, cutting the parameter search by 3-5×.

Weighted portfolio APY APYp = Σi (USDi · APYi) / Σi USDi
Metropolis-Hastings acceptance P(accept) = min(1, exp(−ΔE / T)) where T cools on the schedule predicted by the meta-controller.

The full mathematical framework — formulation, proofs, and empirical validation — is documented in two public research papers I authored.

Sonar — risk monitoring

z-score anomaly detection over multi-horizon APY baselines (1d / 7d / 30d), dual-mode SPIKE / TREND scoring (80/20 vs 40/60 weighting), tier-based execution cycles (1h / 2h / 6h), and a financial-inertia mechanism that cut unnecessary portfolio churn by 43 %.

Anomaly score zh(t) = (APY(t) − μh) / σh for h ∈ {1d, 7d, 30d}
Defensive wins · Q1 2026

Sonar suspended user exposure ahead of two publicly confirmed exploits — detection happened before public confirmation in both cases:

  • · Moonwell oracle exploit $1.78M bad debt, 181 borrowers harmed. Sonar flagged abnormal oracle behaviour on Moonwell's Base markets and suspended exposure before the scale of the exploit was publicly confirmed.
  • · Resolv Protocol exploit ~$80M USR minted via a compromised AWS KMS key, ~$25M ETH extracted, USR de-pegged to $0.003. Sonar detected unchecked-minting activity and suspended Resolv-exposed positions before USR's de-peg became publicly visible.

Production performance

All returns net of gas, bridge fees, slippage, and protocol fees.

quarter mean APY vs. best static vs. T-Bills scope
Q4 2025 8.91 % +5.43 % +123.87 % 20 sources, USDC + USDT
Q1 2026 6.06 % +44.3 % 32 sources, USDC + USDT, +EURC
Daily APY of the Sail agent vs. market median over Q1 2026, with the shaded area representing Sail's outperformance.
Q1 2026 — Daily APY: Sail agent vs. market median. Shaded area = outperformance.
Q4 2025 — Sail agent APY trajectory vs. all market sources.
Q4 2025 — Sail vs. all 20 active market sources, daily APY.

Earlier experience

Publications

All four are sole-author work.

Selected projects

optcg — investment portfolio tracker Python · SQLite · Textual TUI · ~6.8k LOC · 2026 github ↗

CLI + TUI portfolio tracker for One Piece TCG (cards, sealed boxes, graded slabs). Live price scraping from CardMarket and eBay with a Cloudflare-aware cookie pipeline that decrypts Chrome / Arc / Brave / Edge cookies on macOS and Windows via each platform's keychain. Offline self-contained HTML dashboard, iCloud sync, P&L per item, receipt management.

Poker Vision Python · PyTorch · OpenCV · 2023 github ↗

Three-module computer-vision system: image acquisition with noise removal, VGG16-based card recognition, and a Monte Carlo equity simulator. High recognition accuracy and realistic two-player simulation. Documented in a university publication.

Poker table — original camera capture Detected card contours Recognition + Monte Carlo equity simulation overlay
Figbot — Twitch moderation bot Java · Multi-agent system · 2022 github ↗

Multi-agent system that assists streamers with chat moderation. Blacklist-based banning, bad-language ratio analysis for timeouts, and a GUI for streamers and mods to review the automated decisions.

Figbot — operator menu Figbot — live Twitch chat moderation
Data Center design Research project · UPM · 2022 · Honors

Group research project: complete data-center design for an online video-editing platform — rack layout, electrical plans, cooling and air-flow design. Matrícula de Honor.

JavaScript-PDL Compiler Java · 2021 · Honors github ↗

Compiler for a JavaScript subset. Lexical, syntactic, and semantic analysers; symbol table; error recovery and warnings. Matrícula de Honor.

Earlier work

Education

Universidad Politécnica de Madrid · 2018 – 2023

B.S. Computer Science · GPA 8.56 / 10. Matrículas de Honor in Operating Systems, Compilers (Procesadores de Lenguajes), Semantic Web & Knowledge Graphs, Art of Programming, Prolog, Programming Project, Data Center Project.

Coursework: Algorithms & Data Structures · AI · Machine Learning · Distributed Systems · Middleware · Concurrency · Probability & Statistics · Computer Networks · Security · Numerical Algorithms · Competitive Programming · Quantum Computing.

Contact

email

alonso.miguel.alvaro1@gmail.com

phone

+34 661 140 420

github

AlvaroAlonso-0

linkedin

alvaro-alonso-miguel