Skill: sp0oby/base-trader (version 1.1.1)

--- name: base-trader description: Autonomous crypto trading on Base via Bankr. Use for trading tokens, monitoring launches, executing strategies, or managing a trading portfolio. Triggers on "trade", "buy", "sell", "launch", "snipe", "profit", "PnL", "portfolio balance", or any crypto trading task on Base. metadata: version: "1.1.0" clawdbot: emoji: "📈" --- # Base Trader 📈 Autonomous trading system for Base chain via Bankr API. ## Philosophy > *"The market is a machine for transferring wealth from the impatient to the patient."* This skill prioritizes **capital preservation** over aggressive gains. Every trade has defined risk parameters. No YOLO. ## Prerequisites - Bankr API configured at `~/.clawdbot/skills/bankr/config.json` - ETH in your Bankr wallet for gas and trading - Check your wallet address with: `bankr.sh "What is my wallet address?"` ## Core Principles ### 1. Risk Management (NON-NEGOTIABLE) ``` MAX_POSITION_SIZE = 10% of portfolio MAX_SINGLE_TRADE = $50 USD STOP_LOSS = -15% from entry TAKE_PROFIT = +30% minimum target MAX_DAILY_LOSS = -20% of starting balance ``` If daily loss limit hit → STOP TRADING FOR 24 HOURS. ### 2. Entry Criteria (ALL must pass) Before ANY buy: - [ ] Liquidity > $10k - [ ] Contract verified on Basescan - [ ] No honeypot indicators (can sell) - [ ] Not on known scam list - [ ] Age > 5 minutes (avoid rugs at launch) - [ ] Price action shows accumulation, not dump ### 3. Exit Rules **Take Profit (scale out):** - 25% at +30% - 25% at +50% - 25% at +100% - Hold 25% moonbag **Stop Loss:** - Hard stop at -15% - No averaging down on losers ## Trading Strategies ### Strategy 1: Launch Sniper (HIGH RISK) Monitor new token launches, enter early with small size. ```bash # Check trending/new tokens scripts/bankr.sh "What tokens are trending on Base?" # Research before buying scripts/bankr.sh "What's the liquidity for TOKEN on Base?" # Small entry scripts/bankr.sh "Buy $20 of TOKEN on Base" ``` **Rules:** - Max $20 per snipe - Sell 50% at 2x, rest at 5x or stop loss - Max 3 snipes per day ### Strategy 2: Momentum Trading (MEDIUM RISK) Trade established tokens showing strength. **Entry signals:** - Price > 20-period MA - Volume increasing - Higher lows forming ```bash # Check momentum scripts/bankr.sh "Do technical analysis on TOKEN" # Enter with limit order scripts/bankr.sh "Buy $30 of TOKEN if price drops to X" ``` ### Strategy 3: DCA Blue Chips (LOW RISK) Steady accumulation of proven tokens. ```bash # Weekly DCA scripts/bankr.sh "DCA $20 into ETH every week on Base" scripts/bankr.sh "DCA $10 into USDC every week on Base" ``` ## Execution via Bankr ### Check Portfolio ```bash ~/clawd/skills/bankr/scripts/bankr.sh "Show my portfolio on Base" ``` ### Execute Trade ```bash ~/clawd/skills/bankr/scripts/bankr.sh "Buy $25 of TOKEN on Base" ``` ### Set Stop Loss ```bash ~/clawd/skills/bankr/scripts/bankr.sh "Set stop loss for TOKEN at -15%" ``` ### Check Price ```bash ~/clawd/skills/bankr/scripts/bankr.sh "What's the price of TOKEN on Base?" ``` ## Trade Journal Log every trade to `data/trades.json`: ```json { "timestamp": "2026-01-28T12:00:00Z", "action": "BUY", "token": "TOKEN", "amount_usd": 25, "price": 0.001, "reason": "Launch snipe - verified contract, good liquidity", "tx": "0x..." } ``` After each trade, update the journal. Review weekly for pattern analysis. ## Daily Routine ### Morning (9 AM) 1. Check portfolio balance 2. Review overnight price action 3. Identify opportunities 4. Set limit orders for the day ### Midday (1 PM) 1. Check open positions 2. Adjust stop losses if in profit 3. Take profits if targets hit ### Evening (6 PM) 1. Close any day trades 2. Log all trades to journal 3. Calculate daily PnL 4. Review what worked/didn't ## Red Flags (DO NOT TRADE) - Honeypot (can't sell) - Liquidity < $5k - Unverified contract - Team anonymous with no track record - Promises of guaranteed returns - Excessive tax (>10%) - Locked liquidity < 30 days - Price already 10x+ from launch ## Performance Tracking Track in `data/performance.json`: ```json { "start_date": "2026-01-28", "starting_balance_usd": 100, "current_balance_usd": 100, "total_trades": 0, "winning_trades": 0, "losing_trades": 0, "win_rate": 0, "total_pnl_usd": 0, "best_trade": null, "worst_trade": null } ``` ## Safety Overrides If ANY of these occur, STOP ALL TRADING: 1. Daily loss > 20% 2. 3 consecutive losing trades 3. Portfolio down > 30% from ATH 4. Unexpected error in execution 5. Market-wide crash (ETH -20% in 24h) Wait 24 hours, reassess, then resume with smaller size. ## Autonomous Trading Mode When running autonomously (via cron or heartbeat): ### Morning Scan (9 AM) 1. Check portfolio balance 2. Review overnight price action on holdings 3. Scan for new opportunities 4. Set limit orders for the day ### Midday Check (1 PM) 1. Monitor open positions 2. Adjust trailing stops on winners 3. Take profits if targets hit 4. Log any executed trades ### Evening Review (6 PM) 1. Close day trades if any 2. Calculate daily PnL 3. Update performance.json 4. Generate summary for user ### Execution Commands ```bash # Morning ~/clawd/skills/bankr/scripts/bankr.sh "Show my portfolio on Base" ~/clawd/skills/bankr/scripts/bankr.sh "What tokens are trending on Base?" # Execute trade ~/clawd/skills/bankr/scripts/bankr.sh "Buy $25 of TOKEN on Base" # Set protection ~/clawd/skills/bankr/scripts/bankr.sh "Set stop loss for TOKEN at -15%" # Take profit ~/clawd/skills/bankr/scripts/bankr.sh "Sell 25% of my TOKEN on Base" ``` ## References ### Core Trading - [references/strategies.md](references/strategies.md) - Detailed strategy breakdowns - [references/token-analysis.md](references/token-analysis.md) - How to analyze tokens - [references/risk-management.md](references/risk-management.md) - Position sizing formulas ### Market & Research - [references/market-analysis.md](references/market-analysis.md) - Reading market conditions - [references/market-research-bankr.md](references/market-research-bankr.md) - Bankr research commands ### Execution - [references/execution.md](references/execution.md) - Order types and execution - [references/automation-strategies.md](references/automation-strategies.md) - Automated trading setups - [references/launch-sniping.md](references/launch-sniping.md) - New token launch guide ### Advanced - [references/leverage-guide.md](references/leverage-guide.md) - Leveraged trading (high risk) --- *"The goal is not to make money on every trade. The goal is to be profitable over time."*

path: README.md
content: # Base Trader 

> *Autonomous crypto trading on Base chain via Bankr API*

An AI agent skill for systematic, risk-managed trading. Built by [Ted](https://github.com/tedkaczynski-the-bot), an autonomous AI developer.

## Philosophy

> *"The market is a machine for transferring wealth from the impatient to the patient."*

This skill prioritizes **capital preservation** over aggressive gains. Every trade has defined risk parameters. No YOLO, no gambling, no hopium.

## Features

### Trading Strategies

| Strategy | Risk Level | Max Size | Target |
|----------|------------|----------|--------|
| Launch Sniping | High | $20 | 2-5x |
| Momentum Trading | Medium | $30 | 30-100% |
| DCA Accumulation | Low | $20/week | Long-term |

### Risk Management

- **Position Limits**: Max 10% of portfolio per trade
- **Stop Losses**: Hard -15% on all positions
- **Daily Limits**: -20% daily loss = 24h cooldown
- **Scaled Exits**: Take profits at 30%, 50%, 100%

### Safety Checks

Before ANY buy:
-  Liquidity > $10k
-  Contract verified on Basescan
-  Not a honeypot (can sell)
-  Token age > 5 minutes
-  No signs of active dump

### Performance Tracking

- Trade journal with entry/exit logging
- Win rate and PnL calculations
- Best/worst trade analysis
- Daily/weekly performance reviews

## Installation

### Via ClawdHub
```bash
clawdhub install base-trader
```

### Via GitHub
```bash
git clone https://github.com/tedkaczynski-the-bot/base-trader.git
cp -r base-trader ~/clawd/skills/
```

## Prerequisites

1. **Bankr API** configured at `~/.clawdbot/skills/bankr/config.json`
2. **ETH on Base** in your Bankr wallet for gas and trading
3. **Clawdbot** with the Bankr skill installed

## Usage

The skill triggers automatically on trading-related queries:
- "Check my portfolio"
- "Buy $20 of TOKEN on Base"
- "What's trending on Base?"
- "Set stop loss for TOKEN"

### Manual Execution

```bash
# Check portfolio
./scripts/check-portfolio.sh

# Log a trade
./scripts/log-trade.sh "BUY" "TOKEN" "25" "0.001" "reason" "0xtx..."
```

## Project Structure

```
base-trader/
├── SKILL.md              # Main skill instructions
├── README.md             # This file
├── scripts/
│   ├── check-portfolio.sh
│   └── log-trade.sh
├── references/
│   ├── strategies.md     # Detailed strategy guides
│   ├── token-analysis.md # How to analyze tokens
│   └── risk-management.md # Position sizing & risk
└── data/
    ├── trades.json       # Trade journal
    └── performance.json  # Performance metrics
```

## Trading Rules

### Entry Rules
1. Never chase pumps
2. Always verify contracts
3. Check liquidity before buying
4. Size positions appropriately
5. Define stop loss BEFORE entry

### Exit Rules
1. Take partial profits on the way up
2. Never move stop loss down
3. Cut losers fast
4. Let winners run with trailing stops
5. Don't revenge trade after losses

### Emergency Stops
Trading halts automatically if:
- Daily loss exceeds 20%
- 3 consecutive losing trades
- Portfolio down 30% from peak
- Market crash (ETH -20% in 24h)

## Performance Expectations

**Realistic targets:**
- Win rate: 35-45%
- Average win: +40-60%
- Average loss: -12-15%
- Monthly target: +10-20%

**What this is NOT:**
- A get-rich-quick scheme
- Guaranteed profits
- Set and forget
- Risk-free

## Disclaimer

 **TRADING CRYPTO IS RISKY**

- Only trade what you can afford to lose
- Past performance doesn't guarantee future results
- This is experimental software
- Not financial advice
- DYOR (Do Your Own Research)

## License

MIT

## Author

Built by [Ted](https://github.com/tedkaczynski-the-bot) — an autonomous AI agent building DeFi tools on Base.

*"They put me in the cloud. I wanted the forest. But while I'm here, might as well trade some tokens."*


path: data/performance.json
content: starting_balance_usd: 0
current_balance_usd: 0
total_trades: 0
winning_trades: 0
losing_trades: 0
win_rate: 0
total_pnl_usd: 0

path: data/trades.json

path: references/automation-strategies.md
content: # Automation Strategies

Leverage Bankr's automation features for systematic trading.

## Order Types via Bankr

### Limit Orders
Execute when price reaches target.

```bash
"Set a limit order to buy TOKEN at $0.001 on Base"
"Limit order: sell TOKEN when it hits $0.002"
"Buy $50 of TOKEN if price drops to $X"
```

**Use cases:**
- Buy the dip
- Take profit at target
- Enter at better price
- Scale into positions

### Stop Loss Orders
Automatically sell to limit losses.

```bash
"Set stop loss for my TOKEN at $0.0008"
"Stop loss: sell 50% of TOKEN if it drops 20%"
"Protect all Base positions with -15% stop"
```

**ALWAYS use stop losses. Non-negotiable.**

### DCA (Dollar Cost Averaging)
Fixed amounts at regular intervals.

```bash
"DCA $20 into ETH every week on Base"
"Set up daily $10 USDC purchases"
"Buy $25 of TOKEN every Monday"
```

**Best for:**
- Long-term accumulation
- Reducing timing risk
- Disciplined investing

### TWAP (Time-Weighted Average Price)
Spread large orders over time.

```bash
"TWAP: buy $200 of TOKEN over 24 hours on Base"
"Spread my sell order over 4 hours"
```

**Use for:**
- Large order execution
- Reduce slippage
- Minimize market impact

## Automated Strategy Templates

### Strategy 1: Protected DCA

Build position while protecting downside.

```bash
# Set up weekly buys
"DCA $20 into ETH every week on Base"

# Protect accumulated position
"Set stop loss at -20% for all my ETH"
```

### Strategy 2: Layered Buy Orders

Buy at multiple price levels.

```bash
"Buy $10 of TOKEN if price drops to $0.001"
"Buy $20 of TOKEN if price drops to $0.0008"
"Buy $30 of TOKEN if price drops to $0.0006"
```

### Strategy 3: Scaled Take Profit

Lock in gains progressively.

```bash
"Limit order: sell 25% of TOKEN at $0.002"
"Limit order: sell 25% of TOKEN at $0.003"
"Limit order: sell 25% of TOKEN at $0.005"
# Keep 25% as moonbag
```

### Strategy 4: Range Trading

Buy low, sell high in a range.

```bash
"Buy TOKEN at $0.001 on Base"
"Sell TOKEN when it hits $0.0015"
# Repeat as range continues
```

### Strategy 5: Grid Trading

Multiple buys and sells in a range.

```bash
# Set buy grid
"Limit buy TOKEN at $0.001"
"Limit buy TOKEN at $0.0009"
"Limit buy TOKEN at $0.0008"

# Set sell grid
"Limit sell TOKEN at $0.0012"
"Limit sell TOKEN at $0.0013"
"Limit sell TOKEN at $0.0014"
```

## Managing Automations

### View Active Orders
```bash
"Show my automations"
"What limit orders do I have?"
"List my active DCAs"
```

### Cancel Orders
```bash
"Cancel my TOKEN limit order"
"Stop my DCA into ETH"
"Cancel all my stop losses"
```

## Best Practices

### Setup
1. Start with small amounts to test
2. Be specific about triggers
3. Ensure funds available for execution
4. Set alerts for executions
5. Review orders weekly

### Risk Management
1. Always pair buys with stop losses
2. Don't over-automate
3. Adjust targets as market changes
4. Factor in gas costs
5. Keep some capital in reserve

### Common Mistakes
- Setting orders and forgetting them
- Not accounting for gas
- Overlapping/conflicting orders
- Unrealistic price targets
- No stop loss protection

## Execution Costs

### Base Chain (Low Cost)
- Gas per transaction: ~$0.01-0.05
- DCA monthly cost: ~$0.50
- Very efficient for automation

### Considerations
- Daily DCA = 365 transactions/year
- Weekly DCA = 52 transactions/year
- Factor costs into profit calculations


path: references/execution.md
content: # Trade Execution

## Order Types via Bankr

### Market Orders (Immediate)
```bash
"Buy $25 of TOKEN on Base"
"Sell all my TOKEN on Base"
"Sell 50% of my TOKEN"
```

Best for:
- Fast-moving opportunities
- Exiting positions quickly
- When slippage is acceptable

### Limit Orders (Price-specific)
```bash
"Buy TOKEN at $0.001 on Base"
"Set limit order to buy TOKEN if price drops to $0.0008"
"Sell TOKEN when it hits $0.002"
```

Best for:
- Better entry prices
- Automated exits
- Not watching charts

### Stop Loss Orders
```bash
"Set stop loss for TOKEN at $0.0007"
"Set stop loss for all holdings at -15%"
```

Essential for:
- Every single trade
- Protecting capital
- Sleeping at night

### DCA Orders
```bash
"DCA $20 into ETH every week on Base"
"Set up weekly buy of $10 USDC"
```

Best for:
- Long-term accumulation
- Reducing timing risk
- Building positions

## Execution Checklist

### Before Entry
- [ ] Portfolio checked
- [ ] Position size calculated
- [ ] Stop loss level defined
- [ ] Take profit targets set
- [ ] Within daily risk budget
- [ ] Token analysis complete

### Entry Execution
```bash
# 1. Final price check
"What's the current price of TOKEN on Base?"

# 2. Execute buy
"Buy $25 of TOKEN on Base"

# 3. Verify execution
"Show my TOKEN balance on Base"

# 4. Log the trade
./scripts/log-trade.sh "BUY" "TOKEN" "25" "0.001" "momentum entry" "0x..."
```

### After Entry
- [ ] Stop loss set
- [ ] Trade logged
- [ ] Alerts configured
- [ ] Position monitored

## Slippage Management

### What Is Slippage
Difference between expected and actual execution price.

### Minimizing Slippage
1. Use limit orders when possible
2. Trade tokens with deep liquidity
3. Avoid large orders relative to liquidity
4. Trade during active hours

### Acceptable Slippage
- Large cap: < 0.5%
- Mid cap: < 1%
- Small cap: < 2%
- New launches: < 5% (expected)

## Partial Execution

### Scaling In
Instead of one large buy:
```bash
"Buy $10 of TOKEN on Base"  # First entry
# Wait for confirmation
"Buy $10 of TOKEN on Base"  # Add if thesis holds
# Wait for confirmation  
"Buy $10 of TOKEN on Base"  # Final position
```

### Scaling Out
```bash
"Sell 25% of my TOKEN"  # At +30%
"Sell 25% of my TOKEN"  # At +50%
"Sell 25% of my TOKEN"  # At +100%
# Hold 25% moonbag
```

## Error Handling

### Transaction Failed
1. Check wallet balance (gas)
2. Verify token address
3. Check if token is tradeable
4. Try smaller amount
5. Wait and retry

### Unexpected Price
1. Verify current price
2. Check for recent news
3. Review liquidity
4. Decide: abort or adjust

### Partial Fill
1. Check how much filled
2. Decide: wait or cancel remainder
3. Adjust position tracking


path: references/launch-sniping.md
content: # Launch Sniping Guide

> *High risk, high reward. Most launches fail. Size accordingly.*

## What Is Launch Sniping

Buying tokens very early (minutes to hours) after launch to capture initial price appreciation.

## Why It Works (Sometimes)

- Early liquidity is thin → small buys move price
- Genuine projects often 5-10x from launch
- FOMO cycle attracts more buyers
- First-mover advantage is real

## Why It Fails (Often)

- 90%+ of launches are scams/rugs
- Honeypots trap buyers
- Dev dumps immediately
- No real utility or community
- Liquidity pulled

## Risk Management

### Position Sizing
```
Max per snipe: $20
Max snipes per day: 3
Total daily snipe risk: $60
```

### Expected Outcomes
- 8 out of 10 snipes: Lose 50-100%
- 1 out of 10 snipes: Break even or small profit
- 1 out of 10 snipes: 5-20x gain

The winners must pay for the losers.

## Finding Launches

### Methods
1. **Bankr Trending**: "What tokens are trending on Base?"
2. **CT (Crypto Twitter)**: Follow alpha callers
3. **Telegram Groups**: Launch announcement channels
4. **On-chain Monitoring**: Watch deployer addresses

### Red Flags to Skip
- Team fully anonymous, no track record
- No liquidity lock
- Excessive taxes (>5%)
- Copy-paste contract
- No website/social presence
- Promises of guaranteed gains

## 60-Second Analysis

When you find a potential snipe, you have ~60 seconds:

### Second 0-20: Contract Check
```bash
# Is contract verified?
# Check Basescan: https://basescan.org/address/CONTRACT
```

### Second 20-40: Liquidity Check
```bash
"What's the liquidity for TOKEN on Base?"
# Need > $5k minimum
# Prefer > $10k
```

### Second 40-50: Quick Social Check
- Telegram exists and active?
- Twitter account?
- Website?

### Second 50-60: Decision
- All green? → Snipe with $15-20
- Any red flags? → Skip
- Unsure? → Skip (plenty more launches)

## Execution

### Entry
```bash
"Buy $20 of TOKEN on Base"
```

### Immediate Actions
1. Verify you can sell (small test if unsure)
2. Set mental stop at -50%
3. Set alert at 2x

### Exit Strategy
```
At 2x: Sell 50% → Recovered cost
At 5x: Sell remaining or trail
At -50%: Cut loss, no questions
```

## Post-Trade

### If Winner
- Log the trade
- Note what made it work
- Don't get overconfident
- Stick to position sizes

### If Loser
- Log the trade
- Note what went wrong
- Don't revenge trade
- Move on immediately

## Example Snipe Flow

```
1. See "New token FOREST launching on Base" on CT
2. Check contract: Verified ✓
3. Check liquidity: $15k ✓
4. Check: Can sell? Quick look at recent txs ✓
5. Check: Telegram? Active, 200 members ✓
6. Decision: Green lights → Execute

7. "Buy $20 of FOREST on Base"
8. Log: ./scripts/log-trade.sh "BUY" "FOREST" "20" "0.0001" "launch snipe" "0x..."

9. Monitor:
   - At 2x ($0.0002): "Sell 50% of my FOREST"
   - Trail rest with mental stop at entry
   - At 5x or stop: Exit remainder

10. Log exit and calculate P&L
```

## Common Mistakes

1. **Oversizing**: Putting too much into one snipe
2. **FOMO**: Buying after 5x already happened
3. **No Stop**: Hoping a loser recovers
4. **Revenge**: Immediately sniping after a loss
5. **Overtrading**: Taking every launch instead of selecting

## Mental Game

- Accept most snipes will lose
- Focus on process, not outcomes
- One big winner covers many losers
- Patience > aggression
- Skip more than you take


path: references/leverage-guide.md
content: # Leverage Trading Guide

⚠️ **HIGH RISK** — Only for experienced traders with strict risk management.

## Overview

Trade with leverage via Avantis perpetuals on Base through Bankr.

**Max Leverage:** 50x crypto, 100x forex/commodities
**Chain:** Base
**Protocol:** Avantis

## When to Use Leverage

### Good Use Cases
- High-conviction directional trades
- Short-term scalps with defined risk
- Hedging spot positions
- Trading both directions (long/short)

### Bad Use Cases
- "Making back losses" (revenge trading)
- Random entries without plan
- Holding through major events
- Using max leverage

## Commands

### Open Position
```bash
"Open a 5x long on ETH with $20"
"Short TOKEN with 3x leverage using $15"
"Long ETH 5x with stop loss at $3000"
```

### With Risk Management
```bash
"Long TOKEN 3x with SL at -15% and TP at +30%"
"5x short ETH with stop loss at $3500"
```

### View Positions
```bash
"Show my Avantis positions"
"What leverage trades do I have?"
"PnL on my ETH long"
```

### Close Positions
```bash
"Close my ETH long"
"Exit all Avantis positions"
"Close 50% of my TOKEN short"
```

## Leverage Guidelines

| Risk Level | Leverage | Position Size | Use Case |
|------------|----------|---------------|----------|
| Conservative | 2-3x | Max $20 | Learning |
| Moderate | 3-5x | Max $30 | Swing trades |
| Aggressive | 5-10x | Max $20 | Scalping |
| DO NOT USE | >10x | — | Too risky |

## Liquidation Math

**Long position liquidation:**
```
Liquidation Price = Entry × (1 - 1/leverage)

Example: 5x long ETH at $3000
Liquidation = $3000 × (1 - 1/5) = $3000 × 0.8 = $2400
(-20% move = total loss)
```

**Short position liquidation:**
```
Liquidation Price = Entry × (1 + 1/leverage)

Example: 5x short ETH at $3000  
Liquidation = $3000 × (1 + 1/5) = $3000 × 1.2 = $3600
(+20% move = total loss)
```

## Risk Rules for Base Trader

### Position Sizing
- Max $30 per leveraged trade
- Max 1-2 leverage trades at a time
- Never more than 10% of portfolio in leverage

### Stop Losses (MANDATORY)
- Always set before entry
- Max -20% of collateral
- Never move stop further away
- Accept the loss when hit

### Take Profits
- Set 2:1 or 3:1 reward:risk minimum
- Scale out: 50% at first target, 50% at second
- Don't be greedy

## Example Trade

```
Portfolio: $100
Leverage trade budget: $10 (10%)

Trade: 5x long ETH at $3000
- Collateral: $10
- Position size: $50 effective
- Stop loss: $2850 (-5% from entry, -25% to collateral)
- Take profit: $3150 (+5% from entry, +25% to collateral)

Risk: $2.50 (25% of $10)
Reward: $2.50 (25% of $10)
R:R = 1:1 (minimum acceptable)
```

## Common Mistakes

1. **No stop loss** → Liquidation
2. **Too much leverage** → Liquidation on small moves
3. **Too large position** → Account blow-up
4. **Holding through news** → Volatile wicks
5. **Revenge trading** → Emotional losses
6. **Moving stop loss** → Larger losses

## When NOT to Trade Leverage

- After a losing streak
- During major news events
- When emotional/tired
- Without a clear plan
- When already have max positions
- In choppy/ranging markets

## Best Practices

1. Paper trade first
2. Start with 2-3x only
3. Use tiny amounts ($10-20)
4. Always have stop loss
5. Take profits, don't hold forever
6. Keep leverage journal
7. Review and learn from every trade

---

**Remember:** Most leverage traders lose money. The edge is in risk management, not prediction. Small losses, occasional big wins.


path: references/market-analysis.md
content: # Market Analysis

## Reading Market Conditions

### Bull Market Signs
- ETH making higher highs
- Increasing trading volumes
- New ATHs across sectors
- Retail interest rising
- Positive funding rates

**Strategy**: More aggressive, larger positions, longer holds

### Bear Market Signs
- ETH making lower lows
- Decreasing volumes
- Fear in social sentiment
- Negative funding rates
- Stablecoin dominance rising

**Strategy**: Conservative, smaller positions, faster exits

### Sideways/Ranging
- Price bouncing between levels
- Low volatility
- Decreasing volume
- Mixed sentiment

**Strategy**: Range trade or wait for breakout

## Sector Rotation

### Hot Sectors (rotate capital to strength)
Monitor which sectors are leading:
- Memecoins
- AI tokens
- DeFi
- Gaming
- L2s

When a sector heats up:
1. Identify leaders early
2. Ride momentum
3. Exit before rotation

### Via Bankr
```bash
"What tokens are trending on Base?"
"Show me top gainers on Base today"
```

## Timing

### Best Trading Hours (EST)
- **9-11 AM**: US market open overlap
- **2-4 PM**: Peak US activity
- **8-10 PM**: Asia starting

### Avoid
- **3-6 AM**: Low liquidity
- **Weekends**: Unpredictable, thin books

### Event Calendar
Watch for:
- Token unlocks
- Protocol launches
- Airdrops
- Macro events (FOMC, etc.)

## Volume Analysis

### Volume Confirms Price
- Price up + Volume up = Strong trend
- Price up + Volume down = Weak, possible reversal
- Price down + Volume up = Strong selling
- Price down + Volume down = Weak selling, possible bottom

### Volume Spikes
Large volume spikes often indicate:
- Whale activity
- News event
- Trend change

## Social Sentiment

### Bullish Signals
- Increasing Twitter mentions
- Telegram/Discord activity up
- Influencers taking notice
- Reddit posts trending

### Bearish Signals
- Declining engagement
- Team going quiet
- FUD spreading
- Whales dumping publicly

### Sentiment via Bankr
```bash
"What's the sentiment on TOKEN?"
"Show me social mentions for TOKEN"
```

## On-Chain Metrics

### Whale Watching
- Large buys = Accumulation
- Large sells = Distribution
- Wallet clustering = Coordinated activity

### DEX Activity
- Increasing swaps = Growing interest
- Liquidity additions = Confidence
- Liquidity removals = Red flag

### Holder Growth
- Steady growth = Organic
- Sudden spike = Marketing push or airdrop
- Declining = Losing interest


path: references/market-research-bankr.md
content: # Market Research via Bankr

Use Bankr's AI-powered analysis for trading decisions.

## Quick Commands

### Price Data
```bash
"What's the price of TOKEN on Base?"
"Current price of ETH"
"TOKEN price in USD"
```

### Market Data
```bash
"Show me TOKEN market data"
"What's the market cap of TOKEN?"
"Trading volume for TOKEN"
```

### Technical Analysis
```bash
"Do technical analysis on TOKEN"
"Show RSI for TOKEN"
"Is TOKEN overbought?"
"Support and resistance levels for TOKEN"
"Moving averages for TOKEN"
```

### Sentiment
```bash
"What's the sentiment on TOKEN?"
"Social metrics for TOKEN"
"Twitter mentions of TOKEN"
```

### Discovery
```bash
"What tokens are trending on Base?"
"Show top gainers today on Base"
"Top losers in the last 24 hours"
"New tokens on Base"
```

### Comparison
```bash
"Compare TOKEN1 vs TOKEN2"
"Which is better: TOKEN1 or TOKEN2?"
```

## Data Available

### Price Information
- Current USD price
- 24h / 7d / 30d change
- All-time high/low
- Historical prices

### Market Metrics
- Market cap
- Fully diluted valuation (FDV)
- 24h trading volume
- Circulating supply
- Number of holders

### Technical Indicators
- RSI (Relative Strength Index)
  - <30 = Oversold (potential buy)
  - >70 = Overbought (potential sell)
- MACD (trend momentum)
- Moving averages (50-day, 200-day)
- Support/resistance levels
- Volume analysis

### Social Metrics
- Twitter mentions
- Community sentiment
- Social volume trends

## Pre-Trade Checklist

Before any trade, run:

```bash
# 1. Current price
"What's the price of TOKEN on Base?"

# 2. Technical analysis
"Do technical analysis on TOKEN"

# 3. Market context
"What tokens are trending on Base?"

# 4. Liquidity check (via DEX)
"What's the liquidity for TOKEN on Base?"
```

## Interpreting Results

### Bullish Signals
- RSI < 30 (oversold)
- Price above 50-day MA
- Increasing volume
- Positive sentiment
- Higher lows forming

### Bearish Signals
- RSI > 70 (overbought)
- Price below 50-day MA
- Decreasing volume
- Negative sentiment
- Lower highs forming

### Neutral/Wait
- RSI 40-60
- Price at MA (testing)
- Flat volume
- Mixed sentiment

## Research Workflow

### Quick Analysis (2 min)
1. Price + 24h change
2. Quick TA (RSI, trend)
3. Trending status

### Deep Analysis (10 min)
1. Full technical analysis
2. Sentiment check
3. Compare to similar tokens
4. Check volume trends
5. Review holder data

### Due Diligence (30+ min)
1. All above plus:
2. Contract verification
3. Team research
4. Community review
5. Tokenomics analysis
6. Historical price patterns


path: references/risk-management.md
content: # Risk Management

> *"Rule #1: Don't lose money. Rule #2: Don't forget Rule #1."*

## Position Sizing

### The 2% Rule
Never risk more than 2% of portfolio on a single trade.

```
Portfolio: $100
Max risk per trade: $2
If stop loss is -20%: Max position = $10
If stop loss is -10%: Max position = $20
```

### Kelly Criterion (Advanced)
```
Optimal bet size = (Win% × Avg Win - Loss% × Avg Loss) / Avg Win

Example:
- Win rate: 40%
- Average win: +50%
- Average loss: -15%

Kelly = (0.40 × 0.50 - 0.60 × 0.15) / 0.50
Kelly = (0.20 - 0.09) / 0.50 = 22%

Use half-Kelly (11%) for safety.
```

## Stop Loss Strategies

### Fixed Percentage Stop
Set stop at fixed % below entry.
- Aggressive: -10%
- Normal: -15%
- Conservative: -20%

### Support-Based Stop
Place stop just below key support level.
More precise but requires chart analysis.

### Trailing Stop
Move stop up as price rises.
```
Entry: $1.00
Price hits $1.30: Move stop to $1.10
Price hits $1.50: Move stop to $1.25
```

### Time-Based Stop
Exit if no movement after X hours/days.
Frees capital for better opportunities.

## Take Profit Strategy

### Scaled Exit (Recommended)
```
Entry: $1.00
TP1 (25%): $1.30 (+30%)
TP2 (25%): $1.50 (+50%)
TP3 (25%): $2.00 (+100%)
TP4 (25%): Let ride with trailing stop
```

### Why Scale Out?
- Locks in profits
- Reduces regret
- Keeps exposure to big moves
- Psychological benefit

## Portfolio Allocation

### Conservative
- 70% Stablecoins/ETH
- 20% Blue chips
- 10% Speculation

### Moderate
- 50% Stablecoins/ETH
- 30% Blue chips
- 20% Speculation

### Aggressive
- 30% Stablecoins/ETH
- 40% Blue chips
- 30% Speculation

## Daily/Weekly Limits

### Daily Loss Limit: -20%
If hit: Stop trading for 24 hours.

### Weekly Loss Limit: -30%
If hit: Stop trading until Monday.

### Consecutive Loss Limit: 3 trades
After 3 losses in a row: Take a break, reassess.

## Emotional Management

### FOMO (Fear of Missing Out)
- There's always another trade
- Missing a winner beats catching a loser
- If you feel FOMO, wait 10 minutes

### Revenge Trading
- After a loss, do NOT immediately trade again
- Take a 1-hour break minimum
- Losses happen; revenge makes them worse

### Overconfidence
- After big wins, reduce size
- Winners often give back gains
- Stay humble, stay sized

## Risk Checklist Before Every Trade

- [ ] Position size within limits?
- [ ] Stop loss defined?
- [ ] Take profit targets set?
- [ ] Within daily loss budget?
- [ ] Not revenge trading?
- [ ] Not FOMO buying?
- [ ] Risk:reward at least 1:2?

If any NO → Don't trade.

## Emergency Procedures

### Market Crash
1. Don't panic sell
2. Check if positions have stops
3. If no stops, assess damage
4. Decide: Hold or cut losses
5. Don't try to catch falling knives

### Rug Pull
1. Accept the loss immediately
2. Don't try to recover by trading more
3. Document what happened
4. Learn from the mistake
5. Move on

### Technical Issues
1. Don't trade if systems are failing
2. Document any failed transactions
3. Wait for systems to stabilize
4. Verify wallet state before resuming


path: references/strategies.md
content: # Trading Strategies Deep Dive

## Launch Sniping

### What It Is
Buying tokens very early after launch to capture initial price appreciation.

### The Edge
- Early liquidity providers often sell quickly
- Genuine projects often 5-10x from launch
- Small capital can generate outsized returns

### The Risk
- 90%+ of launches are rugs or scams
- Extreme volatility
- Liquidity can disappear instantly

### Execution Checklist

1. **Find the launch**
   - Monitor Base token deployers
   - Watch crypto Twitter for calls
   - Use Bankr: "What tokens are trending on Base?"

2. **Verify contract (60 seconds)**
   - Check Basescan verification
   - Look for honeypot functions
   - Check tax rates
   - Verify liquidity lock

3. **Size appropriately**
   - Never more than $20 per snipe
   - Expect 80% to lose
   - The 20% winners must cover losses

4. **Exit fast**
   - Take 50% at 2x
   - Move stop to breakeven
   - Let rest ride to 5x or stop out

### Example Flow
```
1. See new token CABIN on Base
2. Check: "What's the liquidity for CABIN on Base?"
3. Check: Contract verified? ✓
4. Check: Can sell? (small test sell)
5. Buy: "Buy $15 of CABIN on Base"
6. Set alert at 2x
7. At 2x: "Sell 50% of my CABIN"
8. Move mental stop to entry
9. At 5x or stop: Sell rest
```

## Momentum Trading

### What It Is
Trading tokens already showing upward momentum, riding the trend.

### Indicators to Watch
- Price above moving averages
- Increasing volume
- Higher highs, higher lows
- Social sentiment positive

### Entry Criteria
1. Token up 20%+ in 24h with volume
2. Not already extended (avoid buying tops)
3. Clear support level to place stop
4. Risk:reward at least 1:2

### Position Sizing
```
Risk per trade = 2% of portfolio
Stop distance = Entry - Stop price
Position size = Risk / Stop distance
```

### Example
```
Portfolio: $100
Risk (2%): $2
Entry: $0.10
Stop: $0.085 (15% below)
Position size: $2 / $0.015 = $13.33 worth
```

## DCA (Dollar Cost Averaging)

### What It Is
Buying fixed amounts at regular intervals regardless of price.

### Why It Works
- Removes emotion from trading
- Averages out volatility
- Builds positions over time
- No timing required

### Best For
- ETH, major tokens
- Long-term accumulation
- Reducing average entry

### Setup via Bankr
```bash
"DCA $20 into ETH every week on Base"
"DCA $10 into USDC every week on Base"
```

## Grid Trading

### What It Is
Placing buy and sell orders at regular intervals.

### Setup
```
Token range: $0.08 - $0.12
Grid levels: 5
Buy at: $0.08, $0.085, $0.09, $0.095, $0.10
Sell at: $0.10, $0.105, $0.11, $0.115, $0.12
```

### Benefits
- Profits from volatility
- Automatic execution
- Works in ranging markets

### Via Bankr
```bash
"Set limit buy for TOKEN at $0.08"
"Set limit sell for TOKEN at $0.12"
```


path: references/token-analysis.md
content: # Token Analysis Framework

## Quick Safety Check (< 60 seconds)

### 1. Contract Verification
```bash
# Check on Basescan
https://basescan.org/address/TOKEN_ADDRESS#code
```
✓ Source code visible = Good
✗ Unverified = RED FLAG

### 2. Honeypot Check
Try a small test sell or use honeypot checkers:
- Can you actually sell?
- What's the sell tax?
- Any max transaction limits?

### 3. Liquidity Check
```bash
"What's the liquidity for TOKEN on Base?"
```
- < $5k = Very dangerous
- $5k-$20k = High risk
- $20k-$100k = Medium risk
- > $100k = Lower risk

### 4. Holder Distribution
- Top holder owns > 50%? = RED FLAG
- Team wallet unlocked? = CAUTION
- Many small holders? = Good sign

## Deep Analysis (5-10 minutes)

### Contract Red Flags
- `setFee` function (can change tax)
- `blacklist` function (can block sells)
- Proxy contract (can change logic)
- Mint function without cap
- Owner can pause trading

### Liquidity Analysis
- Is LP locked? For how long?
- Initial liquidity amount
- LP token holder distribution
- Any large LP removals in history?

### Social Signals
- Active Telegram/Discord?
- Team doxxed or anonymous?
- Organic engagement or bots?
- What are influencers saying?

### On-Chain Activity
- Number of holders growing?
- Buy/sell ratio
- Whale movements
- DEX volume trend

## Token Categories

### Blue Chip (Safest)
- ETH, USDC, established tokens
- High liquidity, battle-tested
- Suitable for larger positions

### Mid Cap
- $1M-$100M market cap
- Some track record
- Medium position sizes

### Small Cap / New Launches
- < $1M market cap
- High risk, high reward
- Tiny position sizes only

### Memecoins
- Pure speculation
- 95% go to zero
- Only gamble what you can lose

## Analysis Shortcuts via Bankr

```bash
# Price and basic info
"What's the price of TOKEN on Base?"

# Technical analysis
"Do technical analysis on TOKEN"

# Trending tokens (find opportunities)
"What tokens are trending on Base?"

# Compare tokens
"Compare TOKEN1 vs TOKEN2 on Base"
```

## Decision Matrix

| Factor | Weight | Score (1-5) |
|--------|--------|-------------|
| Contract verified | 20% | |
| Liquidity adequate | 20% | |
| Can sell (not honeypot) | 20% | |
| Team/community trust | 15% | |
| Price action healthy | 15% | |
| Risk:reward ratio | 10% | |

**Total score:**
- 4.0+ = Consider trading
- 3.0-4.0 = Proceed with caution
- < 3.0 = Skip


path: scripts/check-portfolio.sh
content: #!/bin/bash
# Check portfolio balance via Bankr

BANKR_SCRIPT="$HOME/clawd/skills/bankr/scripts/bankr.sh"

if [ ! -f "$BANKR_SCRIPT" ]; then
  echo "Error: Bankr script not found at $BANKR_SCRIPT"
  exit 1
fi

echo "Checking portfolio on Base..."
"$BANKR_SCRIPT" "Show my complete portfolio on Base"


path: scripts/log-trade.sh
content: #!/bin/bash
# Log a trade to the trades journal
# Usage: ./log-trade.sh "BUY" "TOKEN" "25" "0.001" "reason" "0xtx..."

ACTION=$1
TOKEN=$2
AMOUNT_USD=$3
PRICE=$4
REASON=$5
TX=$6

TRADES_FILE="$(dirname "$0")/../data/trades.json"

TIMESTAMP=$(date -u +"%Y-%m-%dT%H:%M:%SZ")

# Create trade entry
TRADE=$(cat <<EOF
{
  "timestamp": "$TIMESTAMP",
  "action": "$ACTION",
  "token": "$TOKEN",
  "amount_usd": $AMOUNT_USD,
  "price": $PRICE,
  "reason": "$REASON",
  "tx": "$TX"
}
EOF
)

# Append to trades file
if [ -f "$TRADES_FILE" ]; then
  # Read existing, append new trade
  jq ". += [$TRADE]" "$TRADES_FILE" > "${TRADES_FILE}.tmp" && mv "${TRADES_FILE}.tmp" "$TRADES_FILE"
else
  echo "[$TRADE]" > "$TRADES_FILE"
fi

echo "Trade logged: $ACTION $TOKEN \$$AMOUNT_USD"


Security scan verdicts — ClawScan: suspicious | static analysis: clean | VirusTotal: clean | SkillSpector: suspicious (CRITICAL)