lemon-strategy
LEMON v2.0.0 โ Degen Fader, senpi_runtime_helpers migration. Counter- trades CHOPPY/DEGEN consensus on 12 crypto majors + 4 XYZ assets when SM is exhausting. MACRO_TREND_GATE (crypto only, blocks fades when |BTC 4h| > 3%). Plumbing-only flip from openclaw cron + mcporter to in-process SenpiClient + long-lived producer_daemon. Thesis preserved verbatim from v1.3.
What this skill does
# ๐ LEMON v2.0.0 โ Degen Fader
## v2.0.0 (2026-05-12) โ plumbing-only migration
NO thesis change. v1.3 fade scoring, MACRO_TREND_GATE, XYZ unban, leverage tiers (5x/7x/10x), MARGIN_PCT 30%, MIN_SCORE 9 all preserved verbatim. Migration: mcporter โ SenpiClient, scanner-side `create_position` โ producer `push_signal()` with LLM-gated runtime action, Python state files for daily cap โ `runtime.yaml risk.guard_rails`, MARKET exits โ FEE_OPTIMIZED_LIMIT.
The crowd is wrong. Lemon trades against the worst traders on the Hyperfeed when their consensus is fading.
## Thesis
Hyperliquid attracts a lot of low-quality, high-leverage retail traders ("degens"). The Senpi MCP `discovery_get_top_traders` tool classifies traders by Trading Consistency Score (TCS) โ the bottom buckets are CHOPPY and DEGEN. These traders consistently lose money over time. **Counter-trading their consensus when their momentum is fading is a positive-edge strategy.**
Lemon scans 12 liquid crypto majors every 5 minutes for setups where:
1. **Smart money is concentrated** on one direction (โฅ3% pct of top traders gain, โฅ20 traders)
2. **The 15m velocity is fading** (the move is exhausting โ `contribution_pct_change_15m โค 0.1`, ideally negative)
3. **The 4H price is overextended** in the SM direction (mean-reversion setup)
4. **The 1H price is starting to reverse** toward the fade direction
When all gates pass and the score reaches MIN_SCORE (8), Lemon enters in the **OPPOSITE** direction to the SM consensus. Wide DSL gives the reversal time to develop.
## v1.1 changes from v1.0 (fleet hardening)
- Scanner calls `create_position` internally via mcporter (Wolverine self-executing pattern)
- `feeOptimizedLimitOptions` with FEE_OPTIMIZED_LIMIT order type
- Conviction-scaled leverage: 14+โ20x, 12+โ15x, 10+โ10x, 8+โ7x
- Margin at 50% per trade
- `has_resting_orders()` with reduceOnly filter prevents position stacking
- Hyperfeed multi-window contribution velocity (15m, 1h) scoring
- Move-exhaustion penalty/bonus structure
- No thesis exit โ DSL manages all exits
- `MAX_DAILY_ENTRIES = 3`, `COOLDOWN_MINUTES = 120`
- `XYZ_BANNED = True` โ equities don't follow the same crowding dynamics
## Tracked assets
```
BTC, ETH, SOL, HYPE, AVAX, DOGE, LINK, XRP, ADA, NEAR, UNI, AAVE
```
12 liquid crypto majors. XYZ DEX equities are explicitly banned โ Lemon's thesis doesn't apply to macro-driven instruments.
## Pipeline
```
1. fetch_sm_data() โ leaderboard_get_markets, filter to TRACKED_ASSETS, normalize fields
2. For each asset:
- Skip if currently held
- Skip if on per-asset cooldown
- evaluate_fade(asset, sm_data) โ score the contrarian setup
3. If candidates exist, sort by score, pick best
4. execute_entry() โ call create_position via mcporter
5. Mark cooldown, increment trade counter
```
## Scoring (max ~16 points)
### Hard gates (any failure = reject)
- `pct_of_top_traders_gain โฅ 3%`
- `trader_count โฅ 20`
- `contribution_pct_change_15m โค 0.1` (SM is no longer building, the move is exhausting)
- Asset must be in `TRACKED_ASSETS`
- Not currently held
- Not on per-asset cooldown
- XYZ DEX banned
### Scoring components
| Signal | Points |
|---|---|
| DEGEN_PILE: SM concentration โฅ 20% | 4 |
| HEAVY_CROWD: 12-20% | 3 |
| CROWDED: 7-12% | 2 |
| LEANING: 3-7% | 1 |
| 15M_COLLAPSING: contrib_15m < -2.0 | 3 |
| 15M_FADING: contrib_15m -2.0 to -0.5 | 2 |
| 15M_COOLING: contrib_15m -0.5 to -0.1 | 1 |
| 1H_FADING: contrib_1h < -0.5 | 1 |
| OVEREXTENDED 4H (โฅ3% in SM direction) | 2 |
| EXTENDED 4H (โฅ1.5% in SM direction) | 1 |
| 1H_REVERSING toward fade direction | 1 |
| 4H_SM_WEAKENING (4h contrib < -1.0) | 1 |
| FUNDING_PAYS_FADE (funding direction matches fade) | 1 |
| US_SESSION (13-21 UTC) | 1 |
**Min score: 8.** Leverage tiers: 7x base, 10x at score 10+, 15x at score 12+, 20x at score 14+ (capped by fleet `MAX_LEVERAGE = 20`).
## Key settings
| Setting | Value | Why |
|---|---|---|
| Tracked assets | 12 crypto majors | Liquid, follow crowding dynamics |
| Max positions | 1 | Concentration |
| Margin per trade | 50% | High conviction commits high capital |
| Min score | 8 | Tunable; higher = fewer/better trades |
| Per-asset cooldown | 120 min | Patience between trades |
| Max daily entries | 3 (dynamic cap-aware) | Quality over quantity |
| Leverage tiers | 7x / 10x / 15x / 20x | Fleet conviction-scaled |
| MAX_LEVERAGE | 20 | Fleet hard cap (H12 audit) |
| XYZ banned | True | Equities don't follow the thesis |
## DSL configuration
Wide tiers for fade trades that need time to mean-revert:
| Setting | Value | Notes |
|---|---|---|
| `hard_timeout` | 480 min (8h) | Mean reversion can take hours |
| `weak_peak_cut` | 60 min, min 2.0% | Cut if peak ROE never breaks 2% in 60 min |
| `dead_weight_cut` | 20 min | Cut early stallers |
| `phase1.max_loss_pct` | 15% | Tighter than fleet 25% โ fades fail fast |
| `phase2.tier_1` | +5% / 20% lock | Don't bank too early |
| `phase2.tier_2` | +10% / 40% lock | |
| `phase2.tier_3` | +15% / 60% lock | |
| `phase2.tier_4` | +20% / 75% lock | |
| `phase2.tier_5` | +30% / 85% lock | |
| `phase2.tier_6` | +50% / 92% lock | Maximum protection on huge wins |
## Fleet-standard guardrails
- Self-executing via `create_position` (no external action layer needed)
- Dynamic P&L-aware daily cap (PR #176)
- `has_resting_orders()` auto-cancels stale maker orders >10 min (PR #177)
- Stale-date bug fix in `load_trade_counter()` (PR #177)
- Per-asset cooldown (120 min)
- Conviction-scaled leverage capped at 20x
## โ Critical agent rules
1. **Install path** is `/data/workspace/skills/lemon-strategy/`
2. **THE SCANNER DOES NOT EXIT POSITIONS** โ DSL handles all exits
3. **MAX 1 POSITION at a time**
4. **MAX 3 ENTRIES PER DAY** (dynamic cap may lower this on drawdown)
5. **Thesis is FADING, not following** โ Lemon trades OPPOSITE to SM consensus by design. Direction inversion is intentional.
6. **No XYZ DEX trades** โ equities don't follow the crowding/exhaustion thesis
7. **120-minute per-asset cooldown** โ never bypass
8. **Verify runtime on every session start**
## Setup
### Pull from GitHub
```bash
mkdir -p /data/workspace/skills/lemon-strategy/{config,scripts,state}
curl -s https://raw.githubusercontent.com/Senpi-ai/senpi-skills/main/lemon/runtime.yaml \
-o /data/workspace/skills/lemon-strategy/runtime.yaml
curl -s https://raw.githubusercontent.com/Senpi-ai/senpi-skills/main/lemon/SKILL.md \
-o /data/workspace/skills/lemon-strategy/SKILL.md
curl -s https://raw.githubusercontent.com/Senpi-ai/senpi-skills/main/lemon/config/lemon-config.json \
-o /data/workspace/skills/lemon-strategy/config/lemon-config.json
curl -s https://raw.githubusercontent.com/Senpi-ai/senpi-skills/main/lemon/scripts/lemon-scanner.py \
-o /data/workspace/skills/lemon-strategy/scripts/lemon-scanner.py
curl -s https://raw.githubusercontent.com/Senpi-ai/senpi-skills/main/lemon/scripts/lemon_config.py \
-o /data/workspace/skills/lemon-strategy/scripts/lemon_config.py
```
### Set wallet and chat ID
```bash
sed -i 's/${WALLET_ADDRESS}/<YOUR_STRATEGY_WALLET>/' /data/workspace/skills/lemon-strategy/runtime.yaml
sed -i 's/${TELEGRAM_CHAT_ID}/<YOUR_TELEGRAM_CHAT_ID>/' /data/workspace/skills/lemon-strategy/runtime.yaml
```
Or set in `config/lemon-config.json`. Environment variables: `LEMON_WALLET`, `LEMON_STRATEGY_ID`.
### Install runtime
```bash
openclaw senpi runtime create --path /data/workspace/skills/lemon-strategy/runtime.yaml
openclaw senpi runtime list && openclaw senpi status
```
### Verify
```bash
python3 /data/workspace/skills/lemon-strategy/scripts/lemon-scanner.py
```
Expected: clean exit, JSON output with `"_lemon_version": "1.1"`. Most likely first run shows a heartbeat (no fade signal).
### Run on a recurring schedule
Recommended: detached bash loop (zero LLM wake cost):
```bash
nohup bash -c 'while true; do python3 /data/workspace/skills/lemon-strategy/scripts/lemon-scanner.py >> /tmp/lemon-loop.log 2>&1; sleep 300; done' > /tmp/lemon-nohup.log Related in Web3
xaut-trade
IncludedBuy or sell XAUT (Tether Gold) on Ethereum. Supports market orders (Uniswap V3) and limit orders (UniswapX). Wallet modes: Foundry keystore or WDK. Delegates non-XAUT intents to registered skills (e.g. Polymarket prediction markets, Hyperliquid trading). Triggers: buy XAUT, XAUT trade, swap USDT for XAUT, sell XAUT, swap XAUT for USDT, limit order, limit buy XAUT, limit sell XAUT, check limit order, cancel limit order, XAUT when, create wallet, setup wallet, polymarket, prediction market, bet on, odds on, hyperliquid, perp, perpetual, long, short, open long, open short, close position, leverage.
qfc-openclaw-skill
IncludedQFC blockchain interaction โ wallet, faucet, chain queries, staking, epoch & finality, AI inference
gate-dex-trade
IncludedExecutes on-chain token swaps via Gate DEX. Use when user wants to swap, buy, sell, exchange, or convert tokens, or bridge cross-chain. Covers full swap flow: price quotes, transaction build, signing, and submission. Do NOT use for read-only data lookups or wallet account management.
hunch
IncludedDiscover, bet on, track, and settle Hunch prediction markets in natural language. Trigger when a user wants to bet, take a position, or get odds on a crypto outcome โ token market-cap milestones and flips, launchpad races (Bankr vs pump.fun volume / #1-days / launches over a cap), token head-to-head outperformance, mcap strike-ladders, and up/down price rounds. Also trigger on "what can I bet on about $TOKEN", "odds on โฆ", "take YES/NO on โฆ", "show my Hunch bets", "did my market resolve". Settles in USDC on Base via x402 (โค $10 / bet); every bet returns an on-chain proof.
opensea
IncludedQuery NFT data, trade on the Seaport marketplace, and swap ERC20 tokens across Ethereum, Base, Arbitrum, Optimism, Polygon, and more.
polymarket
IncludedTrade on Polymarket prediction markets (CLOB V2) from a Privy EOA wallet. Search markets, place/cancel orders, manage positions. No private key handling. Use when the user wants to bet on event outcomes (e.g. "buy YES at 0.65 on the ceasefire market", "what are my open positions", "close my Trump bet").