Skip to content
Back to skills

Defi Expert

ASecurity

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.

  • 416 stars
  • 0 votes
  • 0 copies
  • 7 views
  • Added February 8, 2026
blockchaintypescriptdebuggingapi

Works with

  • api

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned February 12, 2026

npx -y skills add aiskillstore/marketplace --skill defi-expert --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Defi Expert?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Defi Expert
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/aiskillstore-defi-expert/badge)](https://www.skillsdirectory.com/skills/aiskillstore-defi-expert)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: defi-expert
description: 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.
---

# 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;
```

Files in this skill

  • SKILL.md1.7 KB
  • skill-report.json9.6 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…