Skip to content

Add safe-competition-trading-agent plugin#446

Open
maixuancanh wants to merge 2 commits into
okx:mainfrom
maixuancanh:add-safe-competition-trading-agent
Open

Add safe-competition-trading-agent plugin#446
maixuancanh wants to merge 2 commits into
okx:mainfrom
maixuancanh:add-safe-competition-trading-agent

Conversation

@maixuancanh
Copy link
Copy Markdown

Plugin Submission

Plugin name: safe-competition-trading-agent
Version: 1.0.0
Type: new-plugin

Checklist

  • plugin-store lint passes locally with no errors
  • I have read the Development Guide
  • My plugin does NOT use reserved prefixes (okx-, official-, plugin-store-)
  • LICENSE file is included
  • SKILL.md has YAML frontmatter with name and description

What does this plugin do?

safe-competition-trading-agent is a competition-aware Agentic Wallet trading strategy skill. It uses onchainOS as the primary source for wallet status, competition detail, user registration status, token discovery, swap quote, unsigned transaction preparation, and guarded execution.

The skill plans safer competition trades, checks whether a trade is likely eligible for the Agentic Wallet Trading Competition, selects safer real-token candidates, validates workflow order with agent-workflow-composer, runs agent-risk-firewall before execution, and only allows live execution after explicit user confirmation.

Which onchainos commands does it use?

The skill plans and instructs the agent to use these onchainOS commands:

  • onchainos wallet status
  • onchainos competition list --status 0
  • onchainos competition detail --activity-id <activityId>
  • onchainos competition user-status --activity-id <activityId> --evm-wallet <evmWallet> --sol-wallet <solWallet>
  • onchainos token hot-tokens --chain <chain> or equivalent onchainOS token discovery commands
  • onchainos swap quote --from <tokenIn> --to <selectedCandidate> --readable-amount <amount> --chain <chain>
  • onchainOS swap transaction preparation for unsigned transaction context only
  • onchainos swap execute --from <tokenIn> --to <selectedCandidate> --readable-amount <amount> --chain <chain> --wallet <walletAddress> only after firewall allow/warn and explicit user confirmation

It also uses supporting plugin CLIs:

  • agent-workflow-composer plan --input <composerRequest.json> --format json
  • agent-risk-firewall check --input <firewallInput.json> --format json

Security Considerations

The CLI itself does not sign, broadcast, move funds, access private keys, export wallets, or handle seed phrases. It defaults to dry-run.

Live execution is gated by competition context, quote/transaction context, agent-risk-firewall, and explicit user confirmation. The skill rejects unsafe orderings, never uses --force, stops on a block verdict, and requires explicit confirmation for warn verdicts. Internal competition IDs are kept in tool context and must not be shown in user-facing messages.

Testing

Tested locally:

plugin-store lint .\skills\safe-competition-trading-agent
✓ Plugin 'safe-competition-trading-agent' passed all checks

python -m pytest .\skills\safe-competition-trading-agent\tests -q -p no:cacheprovider
14 passed

python -m safe_competition_trading_agent.cli self-test
status: pass

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant