multiAI Summary Pending

defi-expert

DeFi protocol expert ensuring correct data formats, types, denominations, and API structures. MUST be consulted before writing ANY protocol integration code. Triggers on ANY mention of Aave, Compound, Uniswap, Curve, Balancer, or DeFi terms like liquidation, swap, flash loan, health factor.

231 stars

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/defi-expert/SKILL.md --create-dirs "https://raw.githubusercontent.com/aiskillstore/marketplace/main/skills/barissozen/defi-expert/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/defi-expert/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How defi-expert Compares

Feature / Agentdefi-expertStandard Approach
Platform SupportmultiLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

DeFi protocol expert ensuring correct data formats, types, denominations, and API structures. MUST be consulted before writing ANY protocol integration code. Triggers on ANY mention of Aave, Compound, Uniswap, Curve, Balancer, or DeFi terms like liquidation, swap, flash loan, health factor.

Which AI agents support this skill?

This skill is compatible with multi.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# DeFi Expert

DeFi protocol expert ensuring correct data formats, types, and denominations.

## When to Use

- Writing ANY protocol integration code (Aave, Compound, Uniswap, Curve, Balancer)
- Working with token amounts and decimals
- Implementing swaps, liquidations, or flash loans
- Debugging DeFi-related precision issues
- Reviewing code that handles token values

## Workflow

### Step 1: Verify Token Decimals

Check decimals for each token (USDC=6, WBTC=8, ETH=18).

### Step 2: Check Denomination

Verify correct unit (wei, ray, wad, bps).

### Step 3: Validate Addresses

Ensure checksummed addresses are used.

---

**CRITICAL: Before writing ANY DeFi code, verify:**
1. Token decimals (USDC=6, not 18!)
2. Denomination (wei, ray, wad, bps)
3. Checksummed addresses

## Denomination Standards

| Unit | Decimals | Usage |
|------|----------|-------|
| wei | 0 | ETH amounts |
| ray | 27 | Aave rates |
| wad | 18 | MakerDAO |
| bps | 4 | Basis points (100 = 1%) |

## Token Decimals

| Token | Decimals |
|-------|----------|
| ETH/WETH | 18 |
| USDC | 6 ⚠️ |
| USDT | 6 ⚠️ |
| DAI | 18 |
| WBTC | 8 ⚠️ |

## Common Errors
```typescript
// ❌ WRONG
const amount = parseEther(value);  // USDC has 6 decimals!
const hf = rawHF / 1e18;  // Aave uses 1e27!

// ✓ CORRECT
const decimals = await token.decimals();
const amount = parseUnits(value, decimals);
const hf = rawHF / 1e27;
```