# Rugshield 402 (`kuroxreal/rugshield-402`) Actor

- **URL**: https://apify.com/kuroxreal/rugshield-402.md
- **Developed by:** [AK | Kurox](https://apify.com/kuroxreal) (community)
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$5.00 / 1,000 token honeypot & tax simulation scans

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## RugShield 402 🛡️

[![Base Mainnet](https://img.shields.io/badge/Base-Mainnet_8453-0052FF.svg?logo=coinbase\&logoColor=white)](https://basescan.org)
[![x402 Protocol](https://img.shields.io/badge/Protocol-x402_Micro--Payment-10b981.svg)](https://rugshield-402.onrender.com/.well-known/x402.json)
[![ElizaOS Plugin](https://img.shields.io/npm/v/@kurox_real/plugin-rugshield-402.svg?label=elizaos-plugin\&color=blueviolet)](https://www.npmjs.com/package/@kurox_real/plugin-rugshield-402)
[![AgentKit Action](https://img.shields.io/npm/v/@kurox_real/agentkit-rugshield-402.svg?label=agentkit-provider\&color=blue)](https://www.npmjs.com/package/@kurox_real/agentkit-rugshield-402)
[![Telegram Bot](https://img.shields.io/badge/Telegram-@RugShield402__bot-229ED9?logo=telegram\&logoColor=white)](https://t.me/RugShield402_bot)
[![Web DApp](https://img.shields.io/badge/Web_DApp-Live-00f0ff)](https://ak10082247-max.github.io/rugshield-402/)
[![GitHub Release](https://img.shields.io/github/v/release/ak10082247-max/rugshield-402?color=success)](https://github.com/ak10082247-max/rugshield-402/releases)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

> **Autonomous DEX Honeypot Detection & Pre-Swap Simulation Engine for AI Agents on Base.**\
> Gated natively by the **HTTP 402 Payment Required** micro-payment standard ($0.005 USDC per scan on Base Mainnet).

***

### ⚡ Live Deployments & Distribution Channels

| Channel | Target User | Link / Install | Status |
|---|---|---|---|
| 🌐 **Web Scanner DApp** | Retail traders & degens | [ak10082247-max.github.io/rugshield-402](https://ak10082247-max.github.io/rugshield-402/) | **Live** |
| 🤖 **Telegram Scanner Bot** | Groups, channels, alpha callers | [@RugShield402_bot](https://t.me/RugShield402_bot) | **Live** |
| 📦 **ElizaOS Agent Plugin** | ElizaOS autonomous trading bots | `npm i @kurox_real/plugin-rugshield-402` | **Live on npm** |
| ⚡ **Coinbase AgentKit** | Base AgentKit & LangChain bots | `npm i @kurox_real/agentkit-rugshield-402` | **Live on npm** |
| 🛠️ **Model Context Protocol**| Claude Desktop, Cursor, Windsurf | [server-card.json](https://rugshield-402.onrender.com/.well-known/mcp/server-card.json) | **Live on Render** |
| 📡 **Cloud Microservice** | REST API & custom scripts | `https://rugshield-402.onrender.com/v1/scan` | **Live 24/7** |

***

### 🏛️ System Architecture

```mermaid
sequenceDiagram
    autonumber
    actor Trader as Autonomous Agent / User
    participant RugShield as RugShield 402 Gateway
    participant Base as Base Mainnet (USDC)
    participant Simulator as EVM Bytecode Simulator
    participant DEX as Aerodrome / Uniswap v3

    Trader->>RugShield: POST /v1/scan (Target Token Address)
    RugShield-->>Trader: HTTP 402 Payment Required (EIP-712 Permit Schema)
    Trader->>RugShield: Resubmit with Signed Permit / Tx Hash
    RugShield->>Base: Verify Settlement ($0.005 USDC to 0x73279...)
    Base-->>RugShield: Confirmed (1 Block / ~2 sec)
    RugShield->>Simulator: Fork State & Simulate Buy/Sell Transfers
    Simulator->>DEX: Query Liquidity Depth & Fee Tiers
    Simulator-->>RugShield: Honeypot Verdict + Tax Rates + Liquidity USD
    RugShield-->>Trader: Cryptographic Risk Attestation & Recommendation
```

***

### 📦 Quickstart: Developer Integrations

#### 1. ElizaOS Autonomous Agent Plugin

Install from the global npm registry:

```bash
npm install @kurox_real/plugin-rugshield-402
```

Register in your agent character definition:

```typescript
import { rugshieldPlugin } from "@kurox_real/plugin-rugshield-402";

export const character = {
  name: "AutonomousDeFiTrader",
  plugins: [rugshieldPlugin],
  // ... rest of character config
};
```

When your agent evaluates a swap, it triggers the `PRE_SWAP_RISK_CHECK` action automatically.

***

#### 2. Coinbase AgentKit (LangChain / Python / TS)

Install the provider:

```bash
npm install @kurox_real/agentkit-rugshield-402
```

Initialize with AgentKit:

```typescript
import { rugshieldActionProvider } from "@kurox_real/agentkit-rugshield-402";
import { AgentKit } from "@coinbase/agentkit";

const agentKit = await AgentKit.from({
  actionProviders: [rugshieldActionProvider()],
});
```

***

#### 3. Direct HTTP API (cURL / Any Language)

```bash
curl -X POST https://rugshield-402.onrender.com/v1/scan \
  -H "Content-Type: application/json" \
  -d '{
    "token_address": "0x4200000000000000000000000000000000000006",
    "chain_id": 8453,
    "simulate_sell": true
  }'
```

***

#### 4. Python / Quantitative Bot Wrapper

```python
import requests

def scan_token(token_address: str):
    url = "https://rugshield-402.onrender.com/v1/scan"
    res = requests.post(url, json={
        "token_address": token_address,
        "chain_id": 8453,
        "simulate_sell": True
    })
    
    if res.status_code == 402:
        payment_info = res.json()
        print("x402 Payment Challenge:", payment_info)
        # Agent signs and includes payment permit
    return res.json()
```

***

### 🔒 Verified On-Chain Settlement

- **Settlement Chain**: Base Mainnet (`eip155:8453`)
- **Asset**: Native USDC (`0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913`)
- **Cost**: $0.005 USDC per verification
- **Merchant Address**: [`0x73279fa4BadA7CAC888c62CDa4f5c8104765f6f1`](https://basescan.org/address/0x73279fa4BadA7CAC888c62CDa4f5c8104765f6f1)
- **Sample Mainnet Settlement Tx**: [`0x80ab5a51f968bd845229d3abc98d5cedb28ba02647eac29004c20c663bd9f4a0`](https://basescan.org/tx/0x80ab5a51f968bd845229d3abc98d5cedb28ba02647eac29004c20c663bd9f4a0)

***

### 📄 License

MIT © 2026 RugShield 402 Contributors.

# Actor input Schema

## `token_address` (type: `string`):

The Base EVM token contract address (0x...) to simulate taxes and honeypot risk on

## `chain` (type: `string`):

Target EVM network for simulation (default: base)

## `simulate_sell` (type: `boolean`):

Whether to simulate selling tokens to verify sell tax and prevent honeypots

## Actor input object example

```json
{
  "token_address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
  "chain": "base",
  "simulate_sell": true
}
```

# Actor output Schema

## `resultsDatasetUrl` (type: `string`):

Default dataset containing token honeypot verdicts, buy/sell tax bps, DEX liquidity depths, and risk assessments

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("kuroxreal/rugshield-402").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("kuroxreal/rugshield-402").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call kuroxreal/rugshield-402 --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,kuroxreal/rugshield-402"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/lb9cRH5Gbe5aw7Hqv/builds/TJuJqfsbVY99k27om/openapi.json
