Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions agents/error-catalog.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
"category": "validation",
"recovery": "Add --yes flag to confirm, or --dry-run to simulate without executing"
},
"ACCESS_CODE_REMOVED": {
"category": "validation",
"recovery": "Access and invite codes are no longer supported. Pass referral_code, or omit it to register with the default referral code"
},
"NOT_IMPLEMENTED": {
"category": "validation",
"recovery": "This feature is not yet available. Check for updates."
Expand Down Expand Up @@ -124,10 +128,6 @@
"category": "config",
"recovery": "MCP server failed to initialize. Check config and try again"
},
"REGISTER_API_FAILED": {
"category": "api",
"recovery": "Check your registration code and API URL. Run 'vulcan status' to verify connectivity"
},
"TRADERS_FETCH_FAILED": {
"category": "api",
"recovery": "Phoenix API unreachable. Run 'vulcan status' to check connectivity"
Expand Down
16 changes: 2 additions & 14 deletions agents/tool-catalog.json
Original file line number Diff line number Diff line change
Expand Up @@ -1121,27 +1121,15 @@
"name": "vulcan_account_register",
"command": "vulcan account register",
"group": "account",
"description": "Register and onboard a trader account. Omit a code for builder onboarding, pass referral_code for /v1/referral/activate-tx, or pass access_code/invite_code for allowlist activation.",
"description": "Register and onboard a trader account via /v1/referral/activate-tx. Omit referral_code to register with the default code.",
"auth_required": true,
"dangerous": true,
"parameters": [
{
"name": "access_code",
"type": "string",
"required": false,
"description": "Access code for registration"
},
{
"name": "referral_code",
"type": "string",
"required": false,
"description": "Referral code for registration"
},
{
"name": "invite_code",
"type": "string",
"required": false,
"description": "Backwards-compatible alias for access_code"
"description": "Referral code (optional; the default code is used when omitted)"
},
{
"name": "acknowledged",
Expand Down
12 changes: 4 additions & 8 deletions skills/vulcan-onboarding/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Steps 2–6 below are for **live** setup only and should not run if the user has
## Prerequisites

- Solana wallet with SOL (for transaction fees) and USDC (for collateral).
- An access code or referral code for Phoenix DEX registration.
- Optionally, a referral code for Phoenix DEX registration (registration also works without one).

## Step 1: Install and Configure

Expand All @@ -73,7 +73,7 @@ vulcan agent health -o json # readiness and next steps
vulcan agent mcp doctor --target cursor --scope user -o json
```

Setup creates `~/.vulcan/config.toml`, checks trader registration status, can complete registration with no code, an access code, or a referral code, and can install read-only/paper MCP config. The Phoenix API session is signed in automatically using the configured wallet — no separate login step is required.
Setup creates `~/.vulcan/config.toml`, checks trader registration status, can complete registration with or without a referral code, and can install read-only/paper MCP config. The Phoenix API session is signed in automatically using the configured wallet — no separate login step is required.

MCP is optional for paper and dry-run usage. For agent-driven live trading, prefer dangerous MCP with an unlocked session wallet: `vulcan agent mcp install --target cursor --dangerous`. Use this only after the user accepts that `VULCAN_WALLET_PASSWORD` may live in plaintext agent config.

Expand Down Expand Up @@ -111,24 +111,21 @@ vulcan_wallet_balance → {}

## Step 4: Register Trader Account

Registration can be completed without a code through builder onboarding. If the user has a referral code, pass it so Vulcan uses the referral activation transaction flow; access codes remain supported for allowlist activation. The setup wizard can choose the path interactively:
A referral code is optional: when the user has one, pass it; when omitted, Vulcan registers with its default referral code. The setup wizard prompts for an optional referral code interactively:

```bash
vulcan account register
vulcan account register --referral-code <CODE>
vulcan account register --access-code <CODE>
```

For MCP:

```
vulcan_account_register → { acknowledged: true }
vulcan_account_register → { referral_code: "YOUR_CODE", acknowledged: true }
vulcan_account_register → { access_code: "YOUR_CODE", acknowledged: true }
vulcan_account_register → { invite_code: "YOUR_CODE", acknowledged: true } # backwards-compatible alias
```

Registration submits a signed onboarding transaction for the default cross-margin subaccount. Referral codes use `/v1/referral/activate-tx`; no-code onboarding uses the exchange builder endpoints. If the trader is already registered, verify with `vulcan_account_info`.
Registration submits a signed onboarding transaction for the default cross-margin subaccount via `/v1/referral/activate-tx`; the wallet pays the transaction fee and trader-account rent, and the API adds the onboarder co-signature. If the trader is already registered, verify with `vulcan_account_info`.

## Step 5: Deposit Collateral

Expand Down Expand Up @@ -170,6 +167,5 @@ Then place a small test trade.
| `DECRYPT_FAILED` | Wrong password. Set `VULCAN_WALLET_PASSWORD` |
| `NO_TRADER_ACCOUNT` | Register with `vulcan account register` |
| `CONFIG_ERROR` | Run `vulcan setup` |
| `REGISTER_API_FAILED` | Check code validity and `api_url` in `~/.vulcan/config.toml` |
| Insufficient SOL | Fund wallet with SOL for tx fees |
| Insufficient USDC | Transfer USDC to wallet address |
7 changes: 3 additions & 4 deletions vulcan-lib/src/agent_log.rs
Original file line number Diff line number Diff line change
Expand Up @@ -367,8 +367,7 @@ pub fn summarize_args(args: &Value) -> Value {
);
}
"size" | "tokens" | "notional_usdc" | "price" | "tp" | "sl" | "collateral"
| "amount" | "access_code" | "referral_code" | "invite_code" | "api_key"
| "password" => {
| "amount" | "referral_code" | "api_key" | "password" => {
out.insert(key.clone(), serde_json::json!({ "provided": true }));
}
"acknowledged" => {}
Expand Down Expand Up @@ -1360,7 +1359,7 @@ mod tests {
"symbol": "SOL",
"side": "buy",
"notional_usdc": 100,
"access_code": "SECRET",
"referral_code": "SECRET",
"password": "WALLET_SECRET",
"VULCAN_WALLET_PASSWORD": "ENV_SECRET",
"private_key": "PRIVATE_SECRET",
Expand All @@ -1371,7 +1370,7 @@ mod tests {
assert_eq!(redacted["symbol"], "SOL");
assert_eq!(redacted["notional_usdc"]["provided"], true);
assert!(redacted.get("acknowledged").is_none());
assert_ne!(redacted["access_code"], "SECRET");
assert_ne!(redacted["referral_code"], "SECRET");
let encoded = serde_json::to_string(&redacted).unwrap();
assert!(!encoded.contains("WALLET_SECRET"));
assert!(!encoded.contains("ENV_SECRET"));
Expand Down
16 changes: 2 additions & 14 deletions vulcan-lib/src/cli/account.rs
Original file line number Diff line number Diff line change
@@ -1,26 +1,14 @@
//! Account subcommand definitions.

use clap::{ArgGroup, Subcommand};
use clap::Subcommand;

#[derive(Debug, Subcommand)]
pub enum AccountCommand {
/// Register a trader account on Phoenix
#[command(group(
ArgGroup::new("registration_code")
.args(["access_code", "referral_code", "invite_code"])
))]
Register {
/// Access code for registration
#[arg(long)]
access_code: Option<String>,

/// Referral code for registration
/// Referral code (optional; the default code is used when omitted)
#[arg(long)]
referral_code: Option<String>,

/// Backwards-compatible alias for --access-code
#[arg(long)]
invite_code: Option<String>,
},

/// Show trader account details (PDA, subaccounts, margin mode)
Expand Down
Loading
Loading