Aave Oracle Lag Arb logo

Aave Oracle Lag Arb

Community
akari-sora
aave-oracle-lag-arb

Install, run and watch the Aave oracle-lag arbitrage bot (borrow WETH on Aave V3 at the Chainlink price, sell it on a DEX trading above the oracle, buy back after convergence) on Ethereum, Arbitrum, Base and Optimism. Use when the user wants to set up or operate the bot, set its wallet or alert webhook, schedule its health check, read its findings, or unwind and withdraw.

Overview

Publisherakari-sora
Repositoryaave-oracle-lag-arb
Skill nameaave-oracle-lag-arb
Stars
40
Forks
9
Bundled files
Instructions only
LicenseAGPL-3.0-only
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by akari-sora on GitHub. Read the source before you install it.

Installation

Install the Aave Oracle Lag Arb AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/akari-sora/aave-oracle-lag-arb/tree/main/skills/aave-oracle-lag-arb
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/akari-sora/aave-oracle-lag-arb.git /tmp/aave-oracle-lag-arb
mkdir -p .claude/skills
cp -r /tmp/aave-oracle-lag-arb/skills/aave-oracle-lag-arb .claude/skills/aave-oracle-lag-arb
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Aave Oracle Lag Arb in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Aave Oracle Lag Arb on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Aave Oracle Lag Arb is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Aave oracle-lag arbitrage bot

The bot holds a short-ETH position: stablecoin collateral on Aave, WETH debt. It opens only when a DEX prices ETH above Aave's oracle by OPEN_PREMIUM_BPS (default 3%) for CONFIRM_SECONDS, closes when the premium is gone, and deleverages on its own if the health factor drops. Read the repo README's risk section before helping anyone fund it.

Reply in the user's language. The bot's own log lines are Traditional Chinese by default; translate them when you report, or add BOT_LANG=en to the env file for English output (finding codes are the same in both).

Paths

  • Repo checkout: ~/aave-oracle-lag-arb (any path works)
  • App directory: APP=${APP_DIR:-$HOME/.local/share/aave-oracle-lag-arb} (bundled bot, supervisor, state, log)
  • Wallet and alert config: ${ARB_CONFIG_DIR:-$HOME/.config/aave-oracle-lag-arb}/env and alerts.env, mode 600

Install or update

bash
git clone https://gitlab.com/aa22396584/aave-oracle-lag-arb.git ~/aave-oracle-lag-arb 2>/dev/null || git -C ~/aave-oracle-lag-arb pull --ff-only
bash ~/aave-oracle-lag-arb/deploy/install.sh        # --with-op: 1Password; --bundle-node: keep Node in APP (machines that lose /usr/bin/node on reboot); restarts the bot if it runs

Needs Linux (the supervisor uses setsid and /proc), git, curl, and Node 20+ or Linux x64/arm64 for the pinned Node 22 download. On macOS, run cd bot && npm install && node start.ts in a terminal instead.

Set the wallet

Never ask for a private key or mnemonic in ordinary chat. Use one of these:

  1. Your platform's secret input (a masked secret card or secure prompt that becomes an environment variable). Ask for AAVE_BOT_KEY (private key or mnemonic), then: "$APP/set-wallet.sh" --from-env AAVE_BOT_KEY It copies the value into the env file so restarts don't depend on the variable. Never echo the variable.
  2. The user types it in a terminal on that machine: "$APP/set-wallet.sh" (hidden prompt).
  3. 1Password: "$APP/set-wallet.sh" --op op://vault/item/field --token-from-env OP_TOKEN_VAR (install with --with-op).

set-wallet.sh ends by running trader.sh whoami, which prints the address and balances on every chain. If the output mentions MNEMONIC_INDEX, the key is a mnemonic: show the user the numbered account list, ask which one, then run "$APP/set-wallet.sh" --index <n> for MetaMask #n, or --path "m/44'/60'/<n>'/0/0" for Ledger Live #n.

One wallet, one running trader: two traders on the same wallet (on one machine or several) find the same contract and race each other's transactions. If another install already trades this wallet, stop there and tell the user.

Show the address and balances and ask once before starting. The first time, also point the user to DISCLAIMER.md in the repo (unaudited, leveraged short ETH, may lose everything) in one line. Starting deposits all USDC/USDT in that wallet as principal on every chain where Aave accepts it; ETH stays in the wallet for gas.

Run

bash
"$APP/trader.sh" start       # background, restarts itself with backoff; survives your session
"$APP/trader.sh" status      # running or not, mode, last exit, last log lines
"$APP/trader.sh" whoami      # address and balances

Run stop, close-only or exit only when the user asks: stop leaves positions open, close-only stops opening and only unwinds, exit closes everything and withdraws to the wallet (if it can't finish, it restarts in close-only mode; run exit again later).

Scheduled check (every 6 hours is enough; the bot itself reacts every block)

bash
"$APP/trader.sh" ensure      # start it if it isn't running; skips if no wallet or stopped on purpose
"$APP/trader.sh" check       # exit 0: nothing changed since the last check; 1: changed; other: error
  • ensure printing started means the bot had died or the machine rebooted: mention it.
  • ensure printing this environment doesn't have it: the wallet was stored by variable name only and the variable is gone; ask the user to set the wallet again.
  • The first check only records a baseline: it counts as changed only if there is a warning or critical finding (info codes like aave_frozen alone give exit 0).
  • check exit 0 and nothing restarted: stay silent. Exit 1: summarize new and resolved in one or two sentences. Other exit codes: report the first lines of the error once, not every time.

Finding codes (<code>:<chain>, chain is mainnet / arbitrum / base / optimism):

codemeaningwhat to say
premium_opena DEX prices ETH above the oracle by the open thresholdopportunity; the bot acts on its own. If the message says Aave is frozen, it can't borrow yet
hf_lowhealth factor below EMERGENCY_HFurgent: liquidation risk; attach trader.sh status
bot_not_runningopportunity or position, but no heartbeat for a minuterun trader.sh ensure, report the result
position_opena position is openit disappearing means the bot closed it
aave_frozencan't borrow on that chain: WETH frozen, or no stablecoin usable as collateral (LTV 0)it in resolved means borrowable again; the bot deposits pending principal itself
action_failingseveral actions in a row failedattach trader.sh status
gas_lowposition open but little ETH for gasask the user to send ETH on that chain
rpc_errorcouldn't read that chain
trader_crashloop (no chain)the bot keeps exiting right after start (key unreadable, RPCs down)urgent; attach trader.sh status

Instant alerts (optional)

If your platform gives you a webhook that turns POSTs into messages: "$APP/set-alerts.sh" <https://url> --header-from-env AAVE_ALERT_KEY (a bare token becomes Authorization: Bearer <token>). It sends a test POST and prints the HTTP status. The bot then POSTs {source, chain, findings, new, resolved} whenever a chain's findings change. set-alerts.sh --off removes it.

Never

  • print, read aloud or copy the env file, keys, tokens or webhook secrets;
  • send transactions yourself or edit files in $APP;
  • run stop, close-only or exit without the user asking.

Frequently asked questions

What does the Aave Oracle Lag Arb AI skill do?

Install, run and watch the Aave oracle-lag arbitrage bot (borrow WETH on Aave V3 at the Chainlink price, sell it on a DEX trading above the oracle, buy back after convergence) on Ethereum, Arbitrum, Base and Optimism. Use when the user wants to set up or operate the bot, set its wallet or alert webhook, schedule its health check, read its findings, or unwind and withdraw.

Why use Aave Oracle Lag Arb on TypingMind?

Because you install it once and use it with any model. Aave Oracle Lag Arb is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Aave Oracle Lag Arb in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/akari-sora/aave-oracle-lag-arb/tree/main/skills/aave-oracle-lag-arb. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Aave Oracle Lag Arb?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Aave Oracle Lag Arb?

As many as you like. As long as a model supports skills, you can use Aave Oracle Lag Arb with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Aave Oracle Lag Arb AI skill free?

Yes. It is published on GitHub by akari-sora under the AGPL-3.0-only license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇