Skip to the editor

README.md

Shikamaru Protocol

Eliza AI agents, one per risk level, that split a Starknet portfolio between zkLend lending and Ekubo liquidity pools and send the transactions themselves.

What it does

Shikamaru runs three AI agents on elizaOS, an agent framework. Each agent is a character with one risk level: conservative, moderate or aggressive. An agent reads current yields from zkLend, a Starknet lending market, and Ekubo, a Starknet exchange, then decides how to split a sum between them and sends the Starknet transactions.

The risk level sets how much may go to each protocol. These bounds are percentages of the total.

Risk levelLending (zkLend)Liquidity pools (Ekubo)
Conservative60 to 8010 to 20
Moderate45 to 6525 to 35
Aggressive25 to 4535 to 55

How a split is chosen

Each pool gets a risk-adjusted return: its yield minus a 2% risk-free rate, divided by a volatility proxy (24-hour volume over total value locked), and reduced when that proxy exceeds the tier's drawdown limit. Each protocol starts at its minimum share and grows towards its maximum as market conditions favour it. Its share is then divided among its best three pools in proportion to their risk-adjusted returns. The excerpt is that allocation code.

Status

The repository holds the TypeScript agent only. It has no contracts of its own; the agents call zkLend and Ekubo directly. zkLend, one of the two protocols it allocates to, was drained in an exploit in February 2025.

Video

Bridging Finance with Shikamaru Protocol (Loom, 2:35)Watch on Loom