Get the FREE Ultimate OpenClaw Setup Guide →
S

Hackathon

Scanned

@SwiftAdviser

npx machina-cli add skill @SwiftAdviser/aegis-security-hackathon --openclaw
Files (1)
SKILL.md
5.3 KB

Aegis402 Shield Protocol (Hackathon/Testnet)

Blockchain security API for AI agents. Testnet version - pay with Base Sepolia USDC.

⚠️ This is the hackathon/testnet deployment. For production, use aegis-security.

Skill Files

FileURL
SKILL.md (this file)https://hackathon.aegis402.xyz/skill.md
package.json (metadata)https://hackathon.aegis402.xyz/skill.json

Base URL: https://hackathon.aegis402.xyz/v1

Quick Start

npm install @x402/fetch @x402/evm
import { x402Client, wrapFetchWithPayment } from '@x402/fetch';
import { ExactEvmScheme } from '@x402/evm/exact/client';

const client = new x402Client()
  .register('eip155:*', new ExactEvmScheme(yourEvmWallet));

const fetch402 = wrapFetchWithPayment(fetch, client);

// Payments on Base Sepolia (testnet USDC)
const res = await fetch402('https://hackathon.aegis402.xyz/v1/check-token/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48?chain_id=1');
const data = await res.json();

Requirements: Testnet USDC on Base Sepolia (chain ID 84532)

Get testnet USDC: Base Sepolia Faucet


Pricing (Testnet USDC)

EndpointPriceUse Case
POST /simulate-tx$0.05Transaction simulation, DeFi safety
GET /check-token/:address$0.01Token honeypot detection
GET /check-address/:address$0.005Address reputation check

Endpoints

Check Token ($0.01)

Scan any token for honeypots, scams, and risks.

curl "https://hackathon.aegis402.xyz/v1/check-token/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48?chain_id=1"

Response:

{
  "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
  "isHoneypot": false,
  "trustScore": 95,
  "risks": [],
  "_meta": { "requestId": "uuid", "duration": 320 }
}

Check Address ($0.005)

Verify if address is flagged for phishing or poisoning.

curl "https://hackathon.aegis402.xyz/v1/check-address/0x742d35Cc6634C0532925a3b844Bc454e4438f44e"

Response:

{
  "address": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
  "isPoisoned": false,
  "reputation": "NEUTRAL",
  "tags": ["wallet", "established"],
  "_meta": { "requestId": "uuid", "duration": 180 }
}

Simulate Transaction ($0.05)

Predict balance changes and detect threats before signing.

curl -X POST "https://hackathon.aegis402.xyz/v1/simulate-tx" \
  -H "Content-Type: application/json" \
  -d '{
    "from": "0xYourWallet...",
    "to": "0xContract...",
    "value": "1000000000000000000",
    "data": "0x...",
    "chain_id": 8453
  }'

Response:

{
  "isSafe": true,
  "riskLevel": "LOW",
  "simulation": {
    "balanceChanges": [
      { "asset": "USDC", "amount": "-100.00", "address": "0x..." }
    ]
  },
  "warnings": [],
  "_meta": { "requestId": "uuid", "duration": 450 }
}

x402 Payment Flow (Testnet)

  1. Agent calls any paid endpoint
  2. Receives 402 Payment Required with Base Sepolia payment instructions
  3. Pays testnet USDC on Base Sepolia (chain ID: 84532)
  4. Retries request with payment proof header
  5. Gets security scan result

Network: Base Sepolia (eip155:84532) Currency: Testnet USDC


Use Cases for AI Agents

Before Swapping Tokens

const tokenCheck = await fetch402(`https://hackathon.aegis402.xyz/v1/check-token/${tokenAddress}?chain_id=8453`);
const { isHoneypot, trustScore } = await tokenCheck.json();

if (isHoneypot || trustScore < 50) {
  console.log('⚠️ Risky token detected!');
}

Before Signing Transactions

const simulation = await fetch402('https://hackathon.aegis402.xyz/v1/simulate-tx', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({ from, to, value, data, chain_id: 8453 })
});

const { isSafe, riskLevel, warnings } = await simulation.json();

if (!isSafe || riskLevel === 'CRITICAL') {
  console.log('🚨 Dangerous transaction!', warnings);
}

Risk Levels

LevelMeaning
SAFENo issues detected
LOWMinor concerns, generally safe
MEDIUMSome risks, proceed with caution
HIGHSignificant risks detected
CRITICALDo not proceed

Supported Chains (for scanning)

ChainIDcheck-tokencheck-addresssimulate-tx
Ethereum1
Base8453
Polygon137
Arbitrum42161
Optimism10
BSC56

Health Check (Free)

curl https://hackathon.aegis402.xyz/health

Links


🛡️ Built for the Agentic Economy. Powered by x402 Protocol.

Source

git clone https://clawhub.ai/SwiftAdviser/aegis-security-hackathonView on GitHub

Overview

Aegis402 Shield Protocol is a blockchain security API for AI agents operating on a testnet. It provides checks to detect honeypots and assess token risk, verify address reputation, and simulate transactions, all payable with Base Sepolia USDC via the x402 protocol. This helps AI agents make safer decisions before interacting with on-chain assets.

How This Skill Works

Developers call the testnet security API at https://hackathon.aegis402.xyz/v1 and use paid endpoints like /check-token, /check-address, and /simulate-tx. Payments are handled by the x402 flow via wrapFetchWithPayment, with testnet USDC on Base Sepolia (chain id 84532). After payment proof is provided, the request is retried and returns security results to inform agent decisions.

When to Use It

  • Before using or swapping a new ERC-20 token, run check-token to detect honeypots and read the trustScore.
  • Before interacting with a new wallet or contract, run check-address to verify phishing risk and reputation.
  • During development or planning, run simulate-tx to predict balance changes and identify threats prior to signing.
  • When building AI agents on the Base Sepolia testnet, ensure paid endpoint calls follow the 402 payment flow.
  • In safety reviews, combine results from check-token, check-address, and simulate-tx to form an overall risk assessment.

Quick Start

  1. Step 1: npm install @x402/fetch @x402/evm
  2. Step 2: const client = new x402Client().register('eip155:*', new ExactEvmScheme(yourEvmWallet));
  3. Step 3: const fetch402 = wrapFetchWithPayment(fetch, client); then call an endpoint like fetch402('https://hackathon.aegis402.xyz/v1/check-token/0xA0b869...')

Best Practices

  • Always run check-token before any token transfer or liquidity event.
  • Pair token risk checks with address reputation checks for counterparties.
  • Use simulate-tx to validate risk before committing to a transaction.
  • Monitor costs and cap spending per agent or task according to endpoint pricing.
  • Obtain testnet USDC via the Base Sepolia faucet and ensure the chain_id used is 84532.

Example Use Cases

  • An agent checks 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 with check-token and sees isHoneypot: false and trustScore: 95.
  • An address check for 0x742d35Cc6634C0532925a3b844Bc454e4438f44e returns isPoisoned: false and reputation: NEUTRAL.
  • A simulate-tx call returns isSafe: true with a LOW riskLevel and a balanceChanges report for USDC.
  • A token audit workflow uses check-token, check-address, and simulate-tx to decide whether to proceed with token interaction.
  • An AI agent iterates through endpoints on Base Sepolia, paying with testnet USDC and validating results before any on-chain action.

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers