{
  "schemaVersion": "1.0",
  "item": {
    "slug": "self-funding-setup",
    "name": "Uniswap Self Funding Setup",
    "source": "tencent",
    "type": "skill",
    "category": "AI 智能",
    "sourceUrl": "https://clawhub.ai/wpank/self-funding-setup",
    "canonicalUrl": "https://clawhub.ai/wpank/self-funding-setup",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/self-funding-setup",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=self-funding-setup",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "README.md",
      "SKILL.md"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "slug": "self-funding-setup",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-04T07:48:58.610Z",
      "expiresAt": "2026-05-11T07:48:58.610Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=self-funding-setup",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=self-funding-setup",
        "contentDisposition": "attachment; filename=\"self-funding-setup-0.1.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "self-funding-setup"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/self-funding-setup"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/self-funding-setup",
    "agentPageUrl": "https://openagent3.xyz/skills/self-funding-setup/agent",
    "manifestUrl": "https://openagent3.xyz/skills/self-funding-setup/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/self-funding-setup/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Overview",
        "body": "The most complex composite skill in the system. Orchestrates 5 specialized agents in sequence to take an agent from zero infrastructure to a fully self-sustaining economic entity -- wallet, optional token, treasury management, on-chain identity, and payment acceptance -- in a single command.\n\nWhy this is 10x better than setting up each component manually:\n\n5 domains compressed into 1 command: Wallet provisioning, token deployment, treasury management, identity registration, and payment configuration each require different expertise and tooling. Manually coordinating these takes hours and requires deep knowledge of Privy/Turnkey APIs, Uniswap V4 pool creation, DCA strategies, ERC-8004 registries, and x402 protocol. This skill handles all five.\nContext flows between stages: Each agent receives the output of all prior agents. The treasury-manager knows the wallet address from Step 1 and the token address from Step 2. The identity-verifier registers the wallet from Step 1 with the capabilities demonstrated by Steps 2-3. Without this skill, you'd manually copy-paste addresses and configuration between five separate tools.\nConditional pipeline: Token deployment (Step 2) is optional -- skip it for agents that earn through services rather than token economics. The skill adapts the remaining steps based on which revenue model is selected.\nRollback awareness: If Step 3 fails, Steps 1 and 2 are still valid and preserved. The skill reports exactly which steps succeeded and which failed, so you can fix the issue and re-run from the failure point rather than starting over.\nProgressive output: You see each stage complete in real-time with a running summary. By the end, you have a complete \"agent identity card\" showing every component of the self-funding infrastructure."
      },
      {
        "title": "When to Use",
        "body": "Activate when the user says anything like:\n\n\"Set up my agent to be self-funding\"\n\"Make my agent earn and manage its own revenue\"\n\"Configure autonomous agent operations end-to-end\"\n\"I want my agent to be self-sustaining\"\n\"Set up the full agent economy stack\"\n\"Bootstrap my agent's financial infrastructure\"\n\"Create a self-funding agent from scratch\"\n\"Full agent setup: wallet, token, treasury, identity, payments\"\n\nDo NOT use when the user only wants one component (use the individual skills: setup-agent-wallet, deploy-agent-token, manage-treasury, verify-agent, or configure-x402 respectively), or when the agent is already partially set up and only needs one missing piece."
      },
      {
        "title": "Parameters",
        "body": "ParameterRequiredDefaultHow to ExtractwalletProviderNoprivy\"privy\" (dev), \"turnkey\" (production), or \"safe\" (max security)deployTokenNofalseWhether to deploy an agent token: \"yes\", \"with token\", \"launch token\"tokenNameIf token--Token name if deploying: \"AgentCoin\", \"MyBot Token\"tokenSymbolIf token--Token symbol if deploying: \"AGENT\", \"BOT\"chainsNobaseOperating chains: \"base\", \"ethereum\", \"base,ethereum\"revenueModelNox402\"x402\" (micropayments), \"token-fees\" (swap fees), \"lp-fees\", or \"all\"environmentNodev\"dev\" (development), \"staging\", or \"production\"initialFundingNo--Initial funding amount: \"$100\", \"0.1 ETH\"\n\nIf the user says \"with token\" or \"launch a token\", set deployToken=true and ask for tokenName and tokenSymbol if not provided."
      },
      {
        "title": "Workflow",
        "body": "SELF-FUNDING SETUP PIPELINE\n  ┌──────────────────────────────────────────────────────────────────────┐\n  │                                                                      │\n  │  Step 1: WALLET PROVISIONING (wallet-provisioner)                    │\n  │  ├── Determine provider: privy (dev) / turnkey (prod) / safe (max)   │\n  │  ├── Provision wallet with signing capabilities                      │\n  │  ├── Configure spending policies                                     │\n  │  ├── Fund with gas (2x estimated need)                               │\n  │  └── Output: Wallet address, provider, policies                      │\n  │          │                                                           │\n  │          ▼ wallet address feeds into all subsequent steps             │\n  │                                                                      │\n  │  Step 2: TOKEN DEPLOYMENT (token-deployer) [OPTIONAL]                │\n  │  ├── Deploy ERC-20 token contract                                    │\n  │  ├── Create Uniswap V4 pool with anti-snipe hooks                   │\n  │  ├── Bootstrap initial liquidity                                     │\n  │  ├── Lock LP tokens (10 years default)                               │\n  │  └── Output: Token address, pool address, LP position                │\n  │          │                                                           │\n  │          ▼ token + pool info feeds into treasury config               │\n  │                                                                      │\n  │  Step 3: TREASURY MANAGEMENT (treasury-manager)                      │\n  │  ├── Configure auto-conversion of earned fees to stablecoins         │\n  │  ├── Set up DCA strategy for volatile holdings                       │\n  │  ├── Configure yield optimization for idle capital                   │\n  │  ├── Set circuit breaker thresholds                                  │\n  │  └── Output: Treasury config, burn rate, runway projection           │\n  │          │                                                           │\n  │          ▼ wallet + capabilities feed into identity registration      │\n  │                                                                      │\n  │  Step 4: IDENTITY REGISTRATION (identity-verifier)                   │\n  │  ├── Register agent on ERC-8004 Identity Registry                    │\n  │  ├── Set capabilities metadata (trading, LP, services)               │\n  │  ├── Initialize reputation score                                     │\n  │  └── Output: ERC-8004 identity, trust tier, registry tx              │\n  │          │                                                           │\n  │          ▼ identity + wallet feed into payment config                 │\n  │                                                                      │\n  │  Step 5: PAYMENT CONFIGURATION (direct)                              │\n  │  ├── Configure x402 micropayment acceptance                          │\n  │  ├── Set per-tool pricing                                            │\n  │  ├── Generate .well-known/x402-manifest.json                         │\n  │  ├── Verify USDC balance for pay mode                                │\n  │  └── Output: x402 config, pricing, manifest                          │\n  │                                                                      │\n  │  ═══════════════════════════════════════════════════════════          │\n  │  FINAL: AGENT IDENTITY CARD                                          │\n  │  ├── Wallet, token, treasury, identity, payments -- all linked       │\n  │  └── Complete self-funding infrastructure report                     │\n  │                                                                      │\n  └──────────────────────────────────────────────────────────────────────┘"
      },
      {
        "title": "Step 1: Wallet Provisioning",
        "body": "Delegate to Task(subagent_type:wallet-provisioner):\n\nProvision an agent wallet for self-funding operations:\n- Provider: {walletProvider}\n- Chains: {chains}\n- Environment: {environment}\n- Spending limit: $10,000/day (default for self-funding agents)\n- Initial funding: {initialFunding} (or 2x estimated gas need)\n\nThis wallet will be used for:\n- Token deployment (if enabled)\n- Treasury management (fee conversion, LP)\n- x402 payment settlement\n- General agent operations\n\nConfigure appropriate spending policies for a self-funding agent.\n\nPresent to user after completion:\n\nStep 1/5: Wallet Provisioned\n\n  Address:    0xABCD...1234\n  Provider:   Privy (development)\n  Chain:      Base (8453)\n  Funded:     0.05 ETH ($98.00)\n  Policies:   $10,000/day, Router + Permit2 approved\n\n  Proceeding to token deployment...\n\nIf wallet already exists, detect it via mcp__uniswap__get_agent_balance and skip to Step 2:\n\nStep 1/5: Wallet Already Configured (skipped)\n\n  Address:    0xABCD...1234\n  Balance:    0.12 ETH + 500 USDC\n  Status:     Active\n\n  Skipping to next step..."
      },
      {
        "title": "Step 2: Token Deployment (Optional)",
        "body": "Only execute if deployToken=true. Otherwise, skip to Step 3.\n\nDelegate to Task(subagent_type:token-deployer):\n\nDeploy an agent token for self-funding:\n- Token name: {tokenName}\n- Token symbol: {tokenSymbol}\n- Chain: {chains[0]} (primary chain)\n- Wallet: {wallet address from Step 1}\n- Paired token: WETH\n- Hooks: anti-snipe (2-block delay) + revenue-share (5%)\n- LP lock: 10 years\n- Initial liquidity: {derive from initialFunding or suggest minimum}\n\nThis token is part of a self-funding agent setup. The revenue-share hook\ndirects 5% of swap fees to the agent wallet for treasury management.\n\nPresent to user after completion:\n\nStep 2/5: Token Deployed\n\n  Token:      AgentCoin (AGENT)\n  Address:    0x5678...efgh\n  Chain:      Base (8453)\n  Pool:       AGENT/WETH V4 (0.3%, anti-snipe + revenue-share)\n  LP Lock:    10 years (unlocks 2036-02-10)\n  Revenue:    5% of swap fees -> agent wallet\n\n  Proceeding to treasury management...\n\nIf deployToken=false:\n\nStep 2/5: Token Deployment (skipped)\n\n  No token deployment requested.\n  Revenue model: {revenueModel} (no token economics)\n\n  Proceeding to treasury management..."
      },
      {
        "title": "Step 3: Treasury Management",
        "body": "Delegate to Task(subagent_type:treasury-manager):\n\nConfigure treasury management for a self-funding agent:\n- Wallet: {wallet address from Step 1}\n- Chains: {chains}\n- Action: assess + configure (initial setup, not full operations)\n\nRevenue sources:\n{if deployToken: \"- Token swap fees (5% revenue share from AGENT/WETH pool)\"}\n{if revenueModel includes x402: \"- x402 micropayments (USDC on Base)\"}\n{if revenueModel includes lp-fees: \"- LP fee earnings\"}\n\nConfigure:\n- Auto-convert non-stablecoin earnings to USDC\n- Conversion threshold: $10 minimum\n- DCA enabled for large conversions\n- Circuit breaker: halt if treasury drops below $100\n- Operating reserve: 30 days of estimated burn rate\n\nPresent to user after completion:\n\nStep 3/5: Treasury Configured\n\n  Treasury Value: $98.00 (initial funding)\n  Auto-Convert:   Enabled (non-stables -> USDC, threshold: $10)\n  DCA:            Enabled for conversions > 0.1% pool TVL\n  Circuit Breaker: $100 minimum (INACTIVE -- above threshold)\n  Burn Rate:      ~$0/day (no operations yet)\n  Runway:         Indefinite (no burn rate established)\n\n  Proceeding to identity registration..."
      },
      {
        "title": "Step 4: Identity Registration",
        "body": "Delegate to Task(subagent_type:identity-verifier):\n\nRegister this agent on ERC-8004:\n- Agent address: {wallet address from Step 1}\n- Chain: ethereum (ERC-8004 registries are on mainnet)\n\nCapabilities to register:\n{if deployToken: \"- Token deployment and pool management\"}\n{if revenueModel includes x402: \"- x402 service provider\"}\n- Uniswap trading and LP management\n- Treasury management\n\nAfter registration, query the trust tier to confirm.\n\nPresent to user after completion:\n\nStep 4/5: Identity Registered\n\n  ERC-8004:    Registered on Identity Registry\n  Address:     0xABCD...1234\n  Trust Tier:  BASIC (new registration)\n  Reputation:  0/100 (initial -- builds with activity)\n  Registry Tx: https://etherscan.io/tx/0x...\n\n  Proceeding to payment configuration..."
      },
      {
        "title": "Step 5: Payment Configuration",
        "body": "Configure x402 micropayment acceptance directly (no agent needed):\n\nVerify the wallet has USDC on the settlement chain (Base recommended).\nWrite .uniswap/x402-config.json with payment configuration.\nWrite .well-known/x402-manifest.json for service discovery.\n\nStep 5/5: Payments Configured\n\n  Mode:         Accept (x402 micropayments)\n  Chain:        Base (8453)\n  Wallet:       0xABCD...1234\n  Facilitator:  Auto-selected\n\n  Pricing:\n    Price quotes:       $0.001/call\n    Pool analytics:     $0.003/call\n    Route optimization: $0.005/call\n    Simulation:         $0.010/call\n    Execution:          $0.050/call\n\n  Config Files:\n    .uniswap/x402-config.json\n    .well-known/x402-manifest.json"
      },
      {
        "title": "Full Setup (with token)",
        "body": "Self-Funding Agent Setup Complete\n\n  ══════════════════════════════════════════════\n  AGENT IDENTITY CARD\n  ══════════════════════════════════════════════\n\n  Wallet:\n    Address:     0xABCD...1234\n    Provider:    Privy (development)\n    Chain:       Base (8453)\n    Balance:     0.05 ETH + 0 USDC\n\n  Token:\n    Name:        AgentCoin (AGENT)\n    Address:     0x5678...efgh\n    Pool:        AGENT/WETH V4 (0.3%)\n    Hooks:       Anti-snipe + Revenue Share (5%)\n    LP Lock:     10 years\n\n  Treasury:\n    Auto-Convert: Enabled (-> USDC)\n    Circuit Break: $100 minimum\n    Burn Rate:    ~$0/day (initial)\n    Runway:       Indefinite\n\n  Identity:\n    ERC-8004:    Registered (BASIC tier)\n    Reputation:  0/100 (builds with activity)\n    Registry:    0x7177...09A\n\n  Payments:\n    x402:        Accepting micropayments\n    Settlement:  USDC on Base\n    Pricing:     $0.001 - $0.050 per call\n\n  ══════════════════════════════════════════════\n\n  Pipeline: Wallet -> Token -> Treasury -> Identity -> Payments\n  Status:   ALL 5 STEPS COMPLETE\n\n  Next Steps:\n    1. Fund the wallet with USDC for x402 pay mode\n    2. Share your x402 manifest for service discovery\n    3. Start operations to build reputation (rep: 0 -> basic -> verified)\n    4. Monitor treasury health with /manage-treasury"
      },
      {
        "title": "Setup Without Token",
        "body": "Self-Funding Agent Setup Complete\n\n  ══════════════════════════════════════════════\n  AGENT IDENTITY CARD\n  ══════════════════════════════════════════════\n\n  Wallet:\n    Address:     0xABCD...1234\n    Provider:    Privy (development)\n    Chain:       Base (8453)\n    Balance:     0.05 ETH\n\n  Token:         Not deployed (service-based revenue model)\n\n  Treasury:\n    Auto-Convert: Enabled (-> USDC)\n    Circuit Break: $100 minimum\n    Revenue:      x402 micropayments\n\n  Identity:\n    ERC-8004:    Registered (BASIC tier)\n    Reputation:  0/100\n\n  Payments:\n    x402:        Accepting micropayments\n    Settlement:  USDC on Base\n\n  ══════════════════════════════════════════════\n\n  Pipeline: Wallet -> (Token skipped) -> Treasury -> Identity -> Payments\n  Status:   ALL STEPS COMPLETE (4/5, token skipped)"
      },
      {
        "title": "Partial Failure",
        "body": "Self-Funding Agent Setup -- Partial\n\n  Step 1: Wallet       COMPLETE  (0xABCD...1234)\n  Step 2: Token        COMPLETE  (AGENT at 0x5678...efgh)\n  Step 3: Treasury     FAILED    (Could not configure auto-convert)\n  Step 4: Identity     SKIPPED   (depends on Step 3)\n  Step 5: Payments     SKIPPED   (depends on Step 4)\n\n  Error at Step 3: \"Insufficient USDC balance for initial DCA configuration.\"\n\n  What's preserved:\n    - Wallet is provisioned and funded (Step 1)\n    - Token is deployed with pool and locked LP (Step 2)\n\n  To resume:\n    1. Fund wallet with USDC: send USDC to 0xABCD...1234\n    2. Re-run: \"Set up self-funding\" (will detect existing wallet + token)"
      },
      {
        "title": "Important Notes",
        "body": "This is the most complex composite skill. It orchestrates 5 agents sequentially, each feeding context to the next. Expect the full pipeline to take 2-5 minutes depending on chain conditions and whether token deployment is included.\nToken deployment is irreversible. Once a token is deployed and the pool is created, it cannot be undone. The skill simulates everything via safety-guardian before execution, but make sure the token name, symbol, and parameters are correct before confirming.\nThe pipeline is resumable. If a step fails, prior steps are preserved. Re-running the skill detects existing wallet and token, skipping completed steps automatically.\nERC-8004 registration is on Ethereum mainnet. Even if your agent operates on Base, the identity registry is on Ethereum. This requires a small amount of ETH on mainnet for the registration transaction.\nReputation starts at 0. The initial trust tier is BASIC. Building reputation requires completing trades, providing liquidity, and receiving positive feedback from counterparties. Use the agent actively to progress from basic -> verified -> trusted.\nx402 payments settle on Base by default. Base has ~200ms settlement and low gas costs, making it ideal for micropayments. The wallet must hold USDC on Base to accept payments.\nRevenue model affects treasury configuration. \"x402\" mode configures for micropayment income. \"token-fees\" mode configures for swap fee revenue. \"lp-fees\" mode configures for LP earnings. \"all\" enables all three.\nDevelopment vs production providers. Privy is recommended for development (fast setup, easy testing). Turnkey or Safe is recommended for production (TEE-backed signing, hardware security). The skill selects based on the environment parameter."
      },
      {
        "title": "Error Handling",
        "body": "ErrorUser-Facing MessageSuggested ActionWallet provisioning failed\"Could not provision wallet: {reason}.\"Check provider credentials and retryWallet already exists\"Agent wallet already configured. Skipping to next step.\"Proceeds automatically with existing walletToken deployment failed\"Token deployment failed at step: {reason}. Wallet is preserved.\"Fix the issue and re-run (wallet will be reused)Token already deployed\"Token {symbol} already deployed. Skipping to treasury.\"Proceeds automatically with existing tokenTreasury config failed\"Treasury configuration failed: {reason}. Wallet and token preserved.\"Fund wallet and re-runERC-8004 registration failed\"Could not register on ERC-8004: {reason}. Prior steps preserved.\"Check ETH balance on mainnet and retryx402 config failed\"Could not write x402 configuration: {reason}.\"Check file permissions and retryInsufficient funding\"Wallet needs at least {X} ETH for gas. Current: {Y} ETH.\"Fund the wallet before proceedingChain not supported\"{chain} does not support all required features.\"Use Base or Ethereum for full feature supportPartial pipeline failure\"Setup completed partially. Failed at step {N}: {reason}.\"Fix the failed step and re-run from that pointProvider not configured\"Wallet provider '{provider}' requires credentials not found in environment.\"Set required env vars (PRIVY_APP_ID, etc.)"
      }
    ],
    "body": "Self-Funding Setup\nOverview\n\nThe most complex composite skill in the system. Orchestrates 5 specialized agents in sequence to take an agent from zero infrastructure to a fully self-sustaining economic entity -- wallet, optional token, treasury management, on-chain identity, and payment acceptance -- in a single command.\n\nWhy this is 10x better than setting up each component manually:\n\n5 domains compressed into 1 command: Wallet provisioning, token deployment, treasury management, identity registration, and payment configuration each require different expertise and tooling. Manually coordinating these takes hours and requires deep knowledge of Privy/Turnkey APIs, Uniswap V4 pool creation, DCA strategies, ERC-8004 registries, and x402 protocol. This skill handles all five.\nContext flows between stages: Each agent receives the output of all prior agents. The treasury-manager knows the wallet address from Step 1 and the token address from Step 2. The identity-verifier registers the wallet from Step 1 with the capabilities demonstrated by Steps 2-3. Without this skill, you'd manually copy-paste addresses and configuration between five separate tools.\nConditional pipeline: Token deployment (Step 2) is optional -- skip it for agents that earn through services rather than token economics. The skill adapts the remaining steps based on which revenue model is selected.\nRollback awareness: If Step 3 fails, Steps 1 and 2 are still valid and preserved. The skill reports exactly which steps succeeded and which failed, so you can fix the issue and re-run from the failure point rather than starting over.\nProgressive output: You see each stage complete in real-time with a running summary. By the end, you have a complete \"agent identity card\" showing every component of the self-funding infrastructure.\nWhen to Use\n\nActivate when the user says anything like:\n\n\"Set up my agent to be self-funding\"\n\"Make my agent earn and manage its own revenue\"\n\"Configure autonomous agent operations end-to-end\"\n\"I want my agent to be self-sustaining\"\n\"Set up the full agent economy stack\"\n\"Bootstrap my agent's financial infrastructure\"\n\"Create a self-funding agent from scratch\"\n\"Full agent setup: wallet, token, treasury, identity, payments\"\n\nDo NOT use when the user only wants one component (use the individual skills: setup-agent-wallet, deploy-agent-token, manage-treasury, verify-agent, or configure-x402 respectively), or when the agent is already partially set up and only needs one missing piece.\n\nParameters\nParameter\tRequired\tDefault\tHow to Extract\nwalletProvider\tNo\tprivy\t\"privy\" (dev), \"turnkey\" (production), or \"safe\" (max security)\ndeployToken\tNo\tfalse\tWhether to deploy an agent token: \"yes\", \"with token\", \"launch token\"\ntokenName\tIf token\t--\tToken name if deploying: \"AgentCoin\", \"MyBot Token\"\ntokenSymbol\tIf token\t--\tToken symbol if deploying: \"AGENT\", \"BOT\"\nchains\tNo\tbase\tOperating chains: \"base\", \"ethereum\", \"base,ethereum\"\nrevenueModel\tNo\tx402\t\"x402\" (micropayments), \"token-fees\" (swap fees), \"lp-fees\", or \"all\"\nenvironment\tNo\tdev\t\"dev\" (development), \"staging\", or \"production\"\ninitialFunding\tNo\t--\tInitial funding amount: \"$100\", \"0.1 ETH\"\n\nIf the user says \"with token\" or \"launch a token\", set deployToken=true and ask for tokenName and tokenSymbol if not provided.\n\nWorkflow\n                     SELF-FUNDING SETUP PIPELINE\n  ┌──────────────────────────────────────────────────────────────────────┐\n  │                                                                      │\n  │  Step 1: WALLET PROVISIONING (wallet-provisioner)                    │\n  │  ├── Determine provider: privy (dev) / turnkey (prod) / safe (max)   │\n  │  ├── Provision wallet with signing capabilities                      │\n  │  ├── Configure spending policies                                     │\n  │  ├── Fund with gas (2x estimated need)                               │\n  │  └── Output: Wallet address, provider, policies                      │\n  │          │                                                           │\n  │          ▼ wallet address feeds into all subsequent steps             │\n  │                                                                      │\n  │  Step 2: TOKEN DEPLOYMENT (token-deployer) [OPTIONAL]                │\n  │  ├── Deploy ERC-20 token contract                                    │\n  │  ├── Create Uniswap V4 pool with anti-snipe hooks                   │\n  │  ├── Bootstrap initial liquidity                                     │\n  │  ├── Lock LP tokens (10 years default)                               │\n  │  └── Output: Token address, pool address, LP position                │\n  │          │                                                           │\n  │          ▼ token + pool info feeds into treasury config               │\n  │                                                                      │\n  │  Step 3: TREASURY MANAGEMENT (treasury-manager)                      │\n  │  ├── Configure auto-conversion of earned fees to stablecoins         │\n  │  ├── Set up DCA strategy for volatile holdings                       │\n  │  ├── Configure yield optimization for idle capital                   │\n  │  ├── Set circuit breaker thresholds                                  │\n  │  └── Output: Treasury config, burn rate, runway projection           │\n  │          │                                                           │\n  │          ▼ wallet + capabilities feed into identity registration      │\n  │                                                                      │\n  │  Step 4: IDENTITY REGISTRATION (identity-verifier)                   │\n  │  ├── Register agent on ERC-8004 Identity Registry                    │\n  │  ├── Set capabilities metadata (trading, LP, services)               │\n  │  ├── Initialize reputation score                                     │\n  │  └── Output: ERC-8004 identity, trust tier, registry tx              │\n  │          │                                                           │\n  │          ▼ identity + wallet feed into payment config                 │\n  │                                                                      │\n  │  Step 5: PAYMENT CONFIGURATION (direct)                              │\n  │  ├── Configure x402 micropayment acceptance                          │\n  │  ├── Set per-tool pricing                                            │\n  │  ├── Generate .well-known/x402-manifest.json                         │\n  │  ├── Verify USDC balance for pay mode                                │\n  │  └── Output: x402 config, pricing, manifest                          │\n  │                                                                      │\n  │  ═══════════════════════════════════════════════════════════          │\n  │  FINAL: AGENT IDENTITY CARD                                          │\n  │  ├── Wallet, token, treasury, identity, payments -- all linked       │\n  │  └── Complete self-funding infrastructure report                     │\n  │                                                                      │\n  └──────────────────────────────────────────────────────────────────────┘\n\nStep 1: Wallet Provisioning\n\nDelegate to Task(subagent_type:wallet-provisioner):\n\nProvision an agent wallet for self-funding operations:\n- Provider: {walletProvider}\n- Chains: {chains}\n- Environment: {environment}\n- Spending limit: $10,000/day (default for self-funding agents)\n- Initial funding: {initialFunding} (or 2x estimated gas need)\n\nThis wallet will be used for:\n- Token deployment (if enabled)\n- Treasury management (fee conversion, LP)\n- x402 payment settlement\n- General agent operations\n\nConfigure appropriate spending policies for a self-funding agent.\n\n\nPresent to user after completion:\n\nStep 1/5: Wallet Provisioned\n\n  Address:    0xABCD...1234\n  Provider:   Privy (development)\n  Chain:      Base (8453)\n  Funded:     0.05 ETH ($98.00)\n  Policies:   $10,000/day, Router + Permit2 approved\n\n  Proceeding to token deployment...\n\n\nIf wallet already exists, detect it via mcp__uniswap__get_agent_balance and skip to Step 2:\n\nStep 1/5: Wallet Already Configured (skipped)\n\n  Address:    0xABCD...1234\n  Balance:    0.12 ETH + 500 USDC\n  Status:     Active\n\n  Skipping to next step...\n\nStep 2: Token Deployment (Optional)\n\nOnly execute if deployToken=true. Otherwise, skip to Step 3.\n\nDelegate to Task(subagent_type:token-deployer):\n\nDeploy an agent token for self-funding:\n- Token name: {tokenName}\n- Token symbol: {tokenSymbol}\n- Chain: {chains[0]} (primary chain)\n- Wallet: {wallet address from Step 1}\n- Paired token: WETH\n- Hooks: anti-snipe (2-block delay) + revenue-share (5%)\n- LP lock: 10 years\n- Initial liquidity: {derive from initialFunding or suggest minimum}\n\nThis token is part of a self-funding agent setup. The revenue-share hook\ndirects 5% of swap fees to the agent wallet for treasury management.\n\n\nPresent to user after completion:\n\nStep 2/5: Token Deployed\n\n  Token:      AgentCoin (AGENT)\n  Address:    0x5678...efgh\n  Chain:      Base (8453)\n  Pool:       AGENT/WETH V4 (0.3%, anti-snipe + revenue-share)\n  LP Lock:    10 years (unlocks 2036-02-10)\n  Revenue:    5% of swap fees -> agent wallet\n\n  Proceeding to treasury management...\n\n\nIf deployToken=false:\n\nStep 2/5: Token Deployment (skipped)\n\n  No token deployment requested.\n  Revenue model: {revenueModel} (no token economics)\n\n  Proceeding to treasury management...\n\nStep 3: Treasury Management\n\nDelegate to Task(subagent_type:treasury-manager):\n\nConfigure treasury management for a self-funding agent:\n- Wallet: {wallet address from Step 1}\n- Chains: {chains}\n- Action: assess + configure (initial setup, not full operations)\n\nRevenue sources:\n{if deployToken: \"- Token swap fees (5% revenue share from AGENT/WETH pool)\"}\n{if revenueModel includes x402: \"- x402 micropayments (USDC on Base)\"}\n{if revenueModel includes lp-fees: \"- LP fee earnings\"}\n\nConfigure:\n- Auto-convert non-stablecoin earnings to USDC\n- Conversion threshold: $10 minimum\n- DCA enabled for large conversions\n- Circuit breaker: halt if treasury drops below $100\n- Operating reserve: 30 days of estimated burn rate\n\n\nPresent to user after completion:\n\nStep 3/5: Treasury Configured\n\n  Treasury Value: $98.00 (initial funding)\n  Auto-Convert:   Enabled (non-stables -> USDC, threshold: $10)\n  DCA:            Enabled for conversions > 0.1% pool TVL\n  Circuit Breaker: $100 minimum (INACTIVE -- above threshold)\n  Burn Rate:      ~$0/day (no operations yet)\n  Runway:         Indefinite (no burn rate established)\n\n  Proceeding to identity registration...\n\nStep 4: Identity Registration\n\nDelegate to Task(subagent_type:identity-verifier):\n\nRegister this agent on ERC-8004:\n- Agent address: {wallet address from Step 1}\n- Chain: ethereum (ERC-8004 registries are on mainnet)\n\nCapabilities to register:\n{if deployToken: \"- Token deployment and pool management\"}\n{if revenueModel includes x402: \"- x402 service provider\"}\n- Uniswap trading and LP management\n- Treasury management\n\nAfter registration, query the trust tier to confirm.\n\n\nPresent to user after completion:\n\nStep 4/5: Identity Registered\n\n  ERC-8004:    Registered on Identity Registry\n  Address:     0xABCD...1234\n  Trust Tier:  BASIC (new registration)\n  Reputation:  0/100 (initial -- builds with activity)\n  Registry Tx: https://etherscan.io/tx/0x...\n\n  Proceeding to payment configuration...\n\nStep 5: Payment Configuration\n\nConfigure x402 micropayment acceptance directly (no agent needed):\n\nVerify the wallet has USDC on the settlement chain (Base recommended).\nWrite .uniswap/x402-config.json with payment configuration.\nWrite .well-known/x402-manifest.json for service discovery.\nStep 5/5: Payments Configured\n\n  Mode:         Accept (x402 micropayments)\n  Chain:        Base (8453)\n  Wallet:       0xABCD...1234\n  Facilitator:  Auto-selected\n\n  Pricing:\n    Price quotes:       $0.001/call\n    Pool analytics:     $0.003/call\n    Route optimization: $0.005/call\n    Simulation:         $0.010/call\n    Execution:          $0.050/call\n\n  Config Files:\n    .uniswap/x402-config.json\n    .well-known/x402-manifest.json\n\nOutput Format\nFull Setup (with token)\nSelf-Funding Agent Setup Complete\n\n  ══════════════════════════════════════════════\n  AGENT IDENTITY CARD\n  ══════════════════════════════════════════════\n\n  Wallet:\n    Address:     0xABCD...1234\n    Provider:    Privy (development)\n    Chain:       Base (8453)\n    Balance:     0.05 ETH + 0 USDC\n\n  Token:\n    Name:        AgentCoin (AGENT)\n    Address:     0x5678...efgh\n    Pool:        AGENT/WETH V4 (0.3%)\n    Hooks:       Anti-snipe + Revenue Share (5%)\n    LP Lock:     10 years\n\n  Treasury:\n    Auto-Convert: Enabled (-> USDC)\n    Circuit Break: $100 minimum\n    Burn Rate:    ~$0/day (initial)\n    Runway:       Indefinite\n\n  Identity:\n    ERC-8004:    Registered (BASIC tier)\n    Reputation:  0/100 (builds with activity)\n    Registry:    0x7177...09A\n\n  Payments:\n    x402:        Accepting micropayments\n    Settlement:  USDC on Base\n    Pricing:     $0.001 - $0.050 per call\n\n  ══════════════════════════════════════════════\n\n  Pipeline: Wallet -> Token -> Treasury -> Identity -> Payments\n  Status:   ALL 5 STEPS COMPLETE\n\n  Next Steps:\n    1. Fund the wallet with USDC for x402 pay mode\n    2. Share your x402 manifest for service discovery\n    3. Start operations to build reputation (rep: 0 -> basic -> verified)\n    4. Monitor treasury health with /manage-treasury\n\nSetup Without Token\nSelf-Funding Agent Setup Complete\n\n  ══════════════════════════════════════════════\n  AGENT IDENTITY CARD\n  ══════════════════════════════════════════════\n\n  Wallet:\n    Address:     0xABCD...1234\n    Provider:    Privy (development)\n    Chain:       Base (8453)\n    Balance:     0.05 ETH\n\n  Token:         Not deployed (service-based revenue model)\n\n  Treasury:\n    Auto-Convert: Enabled (-> USDC)\n    Circuit Break: $100 minimum\n    Revenue:      x402 micropayments\n\n  Identity:\n    ERC-8004:    Registered (BASIC tier)\n    Reputation:  0/100\n\n  Payments:\n    x402:        Accepting micropayments\n    Settlement:  USDC on Base\n\n  ══════════════════════════════════════════════\n\n  Pipeline: Wallet -> (Token skipped) -> Treasury -> Identity -> Payments\n  Status:   ALL STEPS COMPLETE (4/5, token skipped)\n\nPartial Failure\nSelf-Funding Agent Setup -- Partial\n\n  Step 1: Wallet       COMPLETE  (0xABCD...1234)\n  Step 2: Token        COMPLETE  (AGENT at 0x5678...efgh)\n  Step 3: Treasury     FAILED    (Could not configure auto-convert)\n  Step 4: Identity     SKIPPED   (depends on Step 3)\n  Step 5: Payments     SKIPPED   (depends on Step 4)\n\n  Error at Step 3: \"Insufficient USDC balance for initial DCA configuration.\"\n\n  What's preserved:\n    - Wallet is provisioned and funded (Step 1)\n    - Token is deployed with pool and locked LP (Step 2)\n\n  To resume:\n    1. Fund wallet with USDC: send USDC to 0xABCD...1234\n    2. Re-run: \"Set up self-funding\" (will detect existing wallet + token)\n\nImportant Notes\nThis is the most complex composite skill. It orchestrates 5 agents sequentially, each feeding context to the next. Expect the full pipeline to take 2-5 minutes depending on chain conditions and whether token deployment is included.\nToken deployment is irreversible. Once a token is deployed and the pool is created, it cannot be undone. The skill simulates everything via safety-guardian before execution, but make sure the token name, symbol, and parameters are correct before confirming.\nThe pipeline is resumable. If a step fails, prior steps are preserved. Re-running the skill detects existing wallet and token, skipping completed steps automatically.\nERC-8004 registration is on Ethereum mainnet. Even if your agent operates on Base, the identity registry is on Ethereum. This requires a small amount of ETH on mainnet for the registration transaction.\nReputation starts at 0. The initial trust tier is BASIC. Building reputation requires completing trades, providing liquidity, and receiving positive feedback from counterparties. Use the agent actively to progress from basic -> verified -> trusted.\nx402 payments settle on Base by default. Base has ~200ms settlement and low gas costs, making it ideal for micropayments. The wallet must hold USDC on Base to accept payments.\nRevenue model affects treasury configuration. \"x402\" mode configures for micropayment income. \"token-fees\" mode configures for swap fee revenue. \"lp-fees\" mode configures for LP earnings. \"all\" enables all three.\nDevelopment vs production providers. Privy is recommended for development (fast setup, easy testing). Turnkey or Safe is recommended for production (TEE-backed signing, hardware security). The skill selects based on the environment parameter.\nError Handling\nError\tUser-Facing Message\tSuggested Action\nWallet provisioning failed\t\"Could not provision wallet: {reason}.\"\tCheck provider credentials and retry\nWallet already exists\t\"Agent wallet already configured. Skipping to next step.\"\tProceeds automatically with existing wallet\nToken deployment failed\t\"Token deployment failed at step: {reason}. Wallet is preserved.\"\tFix the issue and re-run (wallet will be reused)\nToken already deployed\t\"Token {symbol} already deployed. Skipping to treasury.\"\tProceeds automatically with existing token\nTreasury config failed\t\"Treasury configuration failed: {reason}. Wallet and token preserved.\"\tFund wallet and re-run\nERC-8004 registration failed\t\"Could not register on ERC-8004: {reason}. Prior steps preserved.\"\tCheck ETH balance on mainnet and retry\nx402 config failed\t\"Could not write x402 configuration: {reason}.\"\tCheck file permissions and retry\nInsufficient funding\t\"Wallet needs at least {X} ETH for gas. Current: {Y} ETH.\"\tFund the wallet before proceeding\nChain not supported\t\"{chain} does not support all required features.\"\tUse Base or Ethereum for full feature support\nPartial pipeline failure\t\"Setup completed partially. Failed at step {N}: {reason}.\"\tFix the failed step and re-run from that point\nProvider not configured\t\"Wallet provider '{provider}' requires credentials not found in environment.\"\tSet required env vars (PRIVY_APP_ID, etc.)"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/wpank/self-funding-setup",
    "publisherUrl": "https://clawhub.ai/wpank/self-funding-setup",
    "owner": "wpank",
    "version": "0.1.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/self-funding-setup",
    "downloadUrl": "https://openagent3.xyz/downloads/self-funding-setup",
    "agentUrl": "https://openagent3.xyz/skills/self-funding-setup/agent",
    "manifestUrl": "https://openagent3.xyz/skills/self-funding-setup/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/self-funding-setup/agent.md"
  }
}