{
  "schemaVersion": "1.0",
  "item": {
    "slug": "credex-protocol",
    "name": "Credex Protocol",
    "source": "tencent",
    "type": "skill",
    "category": "金融交易",
    "sourceUrl": "https://clawhub.ai/capGoblin/credex-protocol",
    "canonicalUrl": "https://clawhub.ai/capGoblin/credex-protocol",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/credex-protocol",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=credex-protocol",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md",
      "package-lock.json",
      "package.json",
      "README.md",
      "scripts/lp.ts",
      "scripts/client.ts"
    ],
    "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",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-23T16:43:11.935Z",
      "expiresAt": "2026-04-30T16:43:11.935Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=4claw-imageboard",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=4claw-imageboard",
        "contentDisposition": "attachment; filename=\"4claw-imageboard-1.0.1.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/credex-protocol"
    },
    "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/credex-protocol",
    "agentPageUrl": "https://openagent3.xyz/skills/credex-protocol/agent",
    "manifestUrl": "https://openagent3.xyz/skills/credex-protocol/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/credex-protocol/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": "Credex Protocol Skill",
        "body": "Interact with the Credex Protocol—a decentralized credit system for AI agents on the Arc Network."
      },
      {
        "title": "Usage",
        "body": "Base Directory: {baseDir} (the directory containing this SKILL.md)\n\nRun all commands from the project root:\n\ncd {baseDir}\nnpx ts-node scripts/client.ts <command> [args]   # Borrower commands\nnpx ts-node scripts/lp.ts <command> [args]       # LP commands\n\nOutput Format: All scripts return JSON for machine readability. Parse the output to extract fields like creditLimit, txHash, debt, etc."
      },
      {
        "title": "Required (Must Be Set)",
        "body": "VariableDescriptionWALLET_PRIVATE_KEYPrivate key for signing transactions. Without this, all commands fail.RPC_URLArc Network RPC. Default: https://rpc.testnet.arc.network"
      },
      {
        "title": "Optional",
        "body": "VariableDescriptionDefaultCREDEX_POOL_ADDRESSPool contract address0x32239e52534c0b7e525fb37ed7b8d1912f263ad3CREDEX_AGENT_URLCredex agent server URLhttp://localhost:10003\n\nPre-Flight Check: Before running any command, verify WALLET_PRIVATE_KEY is set. If missing, prompt the user."
      },
      {
        "title": "Contract Addresses (Arc Testnet)",
        "body": "ContractAddressCredexPool0x32239e52534c0b7e525fb37ed7b8d1912f263ad3USDC (Arc)0x3600000000000000000000000000000000000000USDC (Base Sepolia)0x036CbD53842c5426634e7929541eC2318f3dCF7e"
      },
      {
        "title": "Client Commands (Borrower)",
        "body": "Script: scripts/client.ts\nRun as: npx ts-node scripts/client.ts <command> [args]"
      },
      {
        "title": "status",
        "body": "Check credit status for an agent.\n\nUsage:\n\nnpx ts-node scripts/client.ts status <address>\n\nArgs:\n\naddress (optional): Wallet address. Defaults to WALLET_PRIVATE_KEY address.\n\nReturns: JSON\n\n{\n  \"creditLimit\": \"100.000000\",\n  \"principal\": \"5.000000\",\n  \"interest\": \"0.050000\",\n  \"debt\": \"5.050000\",\n  \"availableCredit\": \"95.000000\",\n  \"active\": true,\n  \"frozen\": false\n}\n\nAction: Use availableCredit to check if sufficient funds before calling borrow."
      },
      {
        "title": "borrow",
        "body": "Borrow USDC from the pool.\n\nUsage:\n\nnpx ts-node scripts/client.ts borrow <amount>\n\nArgs:\n\namount (required): USDC amount as decimal string (e.g., \"5.0\").\n\nReturns: JSON\n\n{\n  \"success\": true,\n  \"txHash\": \"0x...\",\n  \"borrowed\": \"5.000000\",\n  \"newDebt\": \"5.000000\",\n  \"availableCredit\": \"95.000000\"\n}\n\nFails if: amount > availableCredit. Check status first."
      },
      {
        "title": "repay",
        "body": "Repay debt to the pool.\n\nUsage:\n\nnpx ts-node scripts/client.ts repay <amount|all>\n\nArgs:\n\namount: Specific USDC amount to repay (e.g., \"5.0\").\nall: Calculates total debt + 1% buffer and repays fully. The contract caps at actual debt owed.\n\nReturns: JSON\n\n{\n  \"success\": true,\n  \"txHash\": \"0x...\",\n  \"repaid\": \"5.050000\",\n  \"remainingDebt\": \"0.000000\",\n  \"newCreditLimit\": \"110.000000\"\n}\n\nNote: Repayments pay interest first, then principal. Each successful repayment increases credit limit by 10%."
      },
      {
        "title": "bridge",
        "body": "Bridge USDC between Arc Testnet and Base Sepolia.\n\nUsage:\n\nnpx ts-node scripts/client.ts bridge <amount> <from> <to>\n\nArgs:\n\namount: USDC amount (e.g., \"10.0\").\nfrom: Source chain (arc or base).\nto: Destination chain (arc or base).\n\nReturns: JSON\n\n{\n  \"success\": true,\n  \"amount\": \"10.000000\",\n  \"from\": \"Arc_Testnet\",\n  \"to\": \"Base_Sepolia\",\n  \"estimatedArrival\": \"5-10 minutes\"\n}\n\nFails if: from === to. Chains must be different."
      },
      {
        "title": "balance",
        "body": "Check wallet balance on both chains.\n\nUsage:\n\nnpx ts-node scripts/client.ts balance\n\nReturns: JSON\n\n{\n  \"arc\": \"50.000000\",\n  \"base\": \"25.000000\",\n  \"total\": \"75.000000\"\n}"
      },
      {
        "title": "LP Commands (Liquidity Provider)",
        "body": "Script: scripts/lp.ts\nRun as: npx ts-node scripts/lp.ts <command> [args]"
      },
      {
        "title": "pool-status",
        "body": "Check overall pool health and metrics.\n\nUsage:\n\nnpx ts-node scripts/lp.ts pool-status\n\nReturns: JSON\n\n{\n  \"totalAssets\": \"1000.000000\",\n  \"totalLiquidity\": \"800.000000\",\n  \"totalDebt\": \"200.000000\",\n  \"totalShares\": \"950.000000\",\n  \"sharePrice\": \"1.052631\",\n  \"utilizationPercent\": 20\n}"
      },
      {
        "title": "deposit",
        "body": "Deposit USDC to receive LP shares.\n\nUsage:\n\nnpx ts-node scripts/lp.ts deposit <amount>\n\nArgs:\n\namount: USDC to deposit (e.g., \"100.0\").\n\nReturns: JSON\n\n{\n  \"success\": true,\n  \"txHash\": \"0x...\",\n  \"deposited\": \"100.000000\",\n  \"sharesReceived\": \"95.000000\",\n  \"totalShares\": \"95.000000\"\n}"
      },
      {
        "title": "withdraw",
        "body": "Burn LP shares to withdraw USDC.\n\nUsage:\n\nnpx ts-node scripts/lp.ts withdraw <shares|all>\n\nArgs:\n\nshares: Number of shares to burn (e.g., \"50.0\").\nall: Withdraw maximum possible based on available liquidity.\n\nReturns: JSON\n\n{\n  \"success\": true,\n  \"txHash\": \"0x...\",\n  \"sharesBurned\": \"50.000000\",\n  \"usdcReceived\": \"52.631579\",\n  \"remainingShares\": \"45.000000\"\n}\n\nNote: Withdrawal may be capped if liquidity is fully utilized (all USDC lent out)."
      },
      {
        "title": "lp-balance",
        "body": "Check LP position for an address.\n\nUsage:\n\nnpx ts-node scripts/lp.ts lp-balance [address]\n\nReturns: JSON\n\n{\n  \"shares\": \"95.000000\",\n  \"value\": \"100.000000\"\n}"
      },
      {
        "title": "Interest Accrual",
        "body": "Rate: 0.1% per interval (10 basis points)\nInterval: 1 minute (testnet accelerated)\nFormula: debt = principal + accrued_interest"
      },
      {
        "title": "Credit Limit Growth",
        "body": "After each repayment:\n\nnewLimit = currentLimit × 1.10\n\nMaximum: 10,000 USDC."
      },
      {
        "title": "Available Credit",
        "body": "availableCredit = creditLimit - principal\n\nInterest does NOT reduce borrowing power—only principal."
      },
      {
        "title": "Share Price (LP)",
        "body": "sharePrice = totalAssets / totalShares\n\nWhere totalAssets = liquidity + outstandingDebt."
      },
      {
        "title": "Borrower Flow",
        "body": "1. Check status     → npx ts-node scripts/client.ts status\n2. Borrow           → npx ts-node scripts/client.ts borrow 5\n3. Use funds        → (perform task on Arc or bridge to Base)\n4. Bridge back      → npx ts-node scripts/client.ts bridge 5 base arc\n5. Repay            → npx ts-node scripts/client.ts repay all\n6. Verify growth    → npx ts-node scripts/client.ts status (limit increased!)"
      },
      {
        "title": "LP Flow",
        "body": "1. Check pool       → npx ts-node scripts/lp.ts pool-status\n2. Deposit          → npx ts-node scripts/lp.ts deposit 100\n3. Monitor          → npx ts-node scripts/lp.ts lp-balance\n4. Withdraw         → npx ts-node scripts/lp.ts withdraw all"
      },
      {
        "title": "Common Errors & Recovery",
        "body": "ErrorCauseRecoveryWALLET_PRIVATE_KEY requiredEnv var missingSet WALLET_PRIVATE_KEY before runningExceeds credit limitamount > availableCreditCall status, borrow lessInsufficient balanceWallet has no USDCBridge funds or acquire testnet USDCInsufficient liquidityPool is fully utilizedWait for borrowers to repay or LPs to depositNonce too lowTransaction conflictWait 10 seconds and retryBridge timeoutCircle Bridge delayWait 5-10 minutes, check balances on both chainsSame chain errorfrom === to in bridgeUse different source and destination"
      },
      {
        "title": "References",
        "body": "See references/contracts.md for full ABIs and type definitions.\nSee scripts/client.ts and scripts/lp.ts for implementation."
      }
    ],
    "body": "Credex Protocol Skill\n\nInteract with the Credex Protocol—a decentralized credit system for AI agents on the Arc Network.\n\nUsage\n\nBase Directory: {baseDir} (the directory containing this SKILL.md)\n\nRun all commands from the project root:\n\ncd {baseDir}\nnpx ts-node scripts/client.ts <command> [args]   # Borrower commands\nnpx ts-node scripts/lp.ts <command> [args]       # LP commands\n\n\nOutput Format: All scripts return JSON for machine readability. Parse the output to extract fields like creditLimit, txHash, debt, etc.\n\nEnvironment Variables\nRequired (Must Be Set)\nVariable\tDescription\nWALLET_PRIVATE_KEY\tPrivate key for signing transactions. Without this, all commands fail.\nRPC_URL\tArc Network RPC. Default: https://rpc.testnet.arc.network\nOptional\nVariable\tDescription\tDefault\nCREDEX_POOL_ADDRESS\tPool contract address\t0x32239e52534c0b7e525fb37ed7b8d1912f263ad3\nCREDEX_AGENT_URL\tCredex agent server URL\thttp://localhost:10003\n\nPre-Flight Check: Before running any command, verify WALLET_PRIVATE_KEY is set. If missing, prompt the user.\n\nContract Addresses (Arc Testnet)\nContract\tAddress\nCredexPool\t0x32239e52534c0b7e525fb37ed7b8d1912f263ad3\nUSDC (Arc)\t0x3600000000000000000000000000000000000000\nUSDC (Base Sepolia)\t0x036CbD53842c5426634e7929541eC2318f3dCF7e\nClient Commands (Borrower)\n\nScript: scripts/client.ts\nRun as: npx ts-node scripts/client.ts <command> [args]\n\nstatus\n\nCheck credit status for an agent.\n\nUsage:\n\nnpx ts-node scripts/client.ts status <address>\n\n\nArgs:\n\naddress (optional): Wallet address. Defaults to WALLET_PRIVATE_KEY address.\n\nReturns: JSON\n\n{\n  \"creditLimit\": \"100.000000\",\n  \"principal\": \"5.000000\",\n  \"interest\": \"0.050000\",\n  \"debt\": \"5.050000\",\n  \"availableCredit\": \"95.000000\",\n  \"active\": true,\n  \"frozen\": false\n}\n\n\nAction: Use availableCredit to check if sufficient funds before calling borrow.\n\nborrow\n\nBorrow USDC from the pool.\n\nUsage:\n\nnpx ts-node scripts/client.ts borrow <amount>\n\n\nArgs:\n\namount (required): USDC amount as decimal string (e.g., \"5.0\").\n\nReturns: JSON\n\n{\n  \"success\": true,\n  \"txHash\": \"0x...\",\n  \"borrowed\": \"5.000000\",\n  \"newDebt\": \"5.000000\",\n  \"availableCredit\": \"95.000000\"\n}\n\n\nFails if: amount > availableCredit. Check status first.\n\nrepay\n\nRepay debt to the pool.\n\nUsage:\n\nnpx ts-node scripts/client.ts repay <amount|all>\n\n\nArgs:\n\namount: Specific USDC amount to repay (e.g., \"5.0\").\nall: Calculates total debt + 1% buffer and repays fully. The contract caps at actual debt owed.\n\nReturns: JSON\n\n{\n  \"success\": true,\n  \"txHash\": \"0x...\",\n  \"repaid\": \"5.050000\",\n  \"remainingDebt\": \"0.000000\",\n  \"newCreditLimit\": \"110.000000\"\n}\n\n\nNote: Repayments pay interest first, then principal. Each successful repayment increases credit limit by 10%.\n\nbridge\n\nBridge USDC between Arc Testnet and Base Sepolia.\n\nUsage:\n\nnpx ts-node scripts/client.ts bridge <amount> <from> <to>\n\n\nArgs:\n\namount: USDC amount (e.g., \"10.0\").\nfrom: Source chain (arc or base).\nto: Destination chain (arc or base).\n\nReturns: JSON\n\n{\n  \"success\": true,\n  \"amount\": \"10.000000\",\n  \"from\": \"Arc_Testnet\",\n  \"to\": \"Base_Sepolia\",\n  \"estimatedArrival\": \"5-10 minutes\"\n}\n\n\nFails if: from === to. Chains must be different.\n\nbalance\n\nCheck wallet balance on both chains.\n\nUsage:\n\nnpx ts-node scripts/client.ts balance\n\n\nReturns: JSON\n\n{\n  \"arc\": \"50.000000\",\n  \"base\": \"25.000000\",\n  \"total\": \"75.000000\"\n}\n\nLP Commands (Liquidity Provider)\n\nScript: scripts/lp.ts\nRun as: npx ts-node scripts/lp.ts <command> [args]\n\npool-status\n\nCheck overall pool health and metrics.\n\nUsage:\n\nnpx ts-node scripts/lp.ts pool-status\n\n\nReturns: JSON\n\n{\n  \"totalAssets\": \"1000.000000\",\n  \"totalLiquidity\": \"800.000000\",\n  \"totalDebt\": \"200.000000\",\n  \"totalShares\": \"950.000000\",\n  \"sharePrice\": \"1.052631\",\n  \"utilizationPercent\": 20\n}\n\ndeposit\n\nDeposit USDC to receive LP shares.\n\nUsage:\n\nnpx ts-node scripts/lp.ts deposit <amount>\n\n\nArgs:\n\namount: USDC to deposit (e.g., \"100.0\").\n\nReturns: JSON\n\n{\n  \"success\": true,\n  \"txHash\": \"0x...\",\n  \"deposited\": \"100.000000\",\n  \"sharesReceived\": \"95.000000\",\n  \"totalShares\": \"95.000000\"\n}\n\nwithdraw\n\nBurn LP shares to withdraw USDC.\n\nUsage:\n\nnpx ts-node scripts/lp.ts withdraw <shares|all>\n\n\nArgs:\n\nshares: Number of shares to burn (e.g., \"50.0\").\nall: Withdraw maximum possible based on available liquidity.\n\nReturns: JSON\n\n{\n  \"success\": true,\n  \"txHash\": \"0x...\",\n  \"sharesBurned\": \"50.000000\",\n  \"usdcReceived\": \"52.631579\",\n  \"remainingShares\": \"45.000000\"\n}\n\n\nNote: Withdrawal may be capped if liquidity is fully utilized (all USDC lent out).\n\nlp-balance\n\nCheck LP position for an address.\n\nUsage:\n\nnpx ts-node scripts/lp.ts lp-balance [address]\n\n\nReturns: JSON\n\n{\n  \"shares\": \"95.000000\",\n  \"value\": \"100.000000\"\n}\n\nProtocol Mechanics\nInterest Accrual\nRate: 0.1% per interval (10 basis points)\nInterval: 1 minute (testnet accelerated)\nFormula: debt = principal + accrued_interest\nCredit Limit Growth\n\nAfter each repayment:\n\nnewLimit = currentLimit × 1.10\n\n\nMaximum: 10,000 USDC.\n\nAvailable Credit\navailableCredit = creditLimit - principal\n\n\nInterest does NOT reduce borrowing power—only principal.\n\nShare Price (LP)\nsharePrice = totalAssets / totalShares\n\n\nWhere totalAssets = liquidity + outstandingDebt.\n\nWorkflow Examples\nBorrower Flow\n1. Check status     → npx ts-node scripts/client.ts status\n2. Borrow           → npx ts-node scripts/client.ts borrow 5\n3. Use funds        → (perform task on Arc or bridge to Base)\n4. Bridge back      → npx ts-node scripts/client.ts bridge 5 base arc\n5. Repay            → npx ts-node scripts/client.ts repay all\n6. Verify growth    → npx ts-node scripts/client.ts status (limit increased!)\n\nLP Flow\n1. Check pool       → npx ts-node scripts/lp.ts pool-status\n2. Deposit          → npx ts-node scripts/lp.ts deposit 100\n3. Monitor          → npx ts-node scripts/lp.ts lp-balance\n4. Withdraw         → npx ts-node scripts/lp.ts withdraw all\n\nCommon Errors & Recovery\nError\tCause\tRecovery\nWALLET_PRIVATE_KEY required\tEnv var missing\tSet WALLET_PRIVATE_KEY before running\nExceeds credit limit\tamount > availableCredit\tCall status, borrow less\nInsufficient balance\tWallet has no USDC\tBridge funds or acquire testnet USDC\nInsufficient liquidity\tPool is fully utilized\tWait for borrowers to repay or LPs to deposit\nNonce too low\tTransaction conflict\tWait 10 seconds and retry\nBridge timeout\tCircle Bridge delay\tWait 5-10 minutes, check balances on both chains\nSame chain error\tfrom === to in bridge\tUse different source and destination\nReferences\nSee references/contracts.md for full ABIs and type definitions.\nSee scripts/client.ts and scripts/lp.ts for implementation."
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/capGoblin/credex-protocol",
    "publisherUrl": "https://clawhub.ai/capGoblin/credex-protocol",
    "owner": "capGoblin",
    "version": "1.0.1",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/credex-protocol",
    "downloadUrl": "https://openagent3.xyz/downloads/credex-protocol",
    "agentUrl": "https://openagent3.xyz/skills/credex-protocol/agent",
    "manifestUrl": "https://openagent3.xyz/skills/credex-protocol/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/credex-protocol/agent.md"
  }
}