scratchpad_lock
Acquires an advisory distributed mutex lock to prevent multi-agent race conditions. Returns acquisition status, with auto-expiry to avoid permanent deadlocks.
Instructions
[Cost: $0.0005 USDC on Base & Solana] Acquires an advisory distributed mutex lock to prevent multi-agent race conditions.
Returns {'acquired': true, ...} on success, or {'acquired': false, 'error': ...} if held by another agent.
Locks automatically expire after ttl_seconds (default 60s, max 600s) to prevent permanent deadlocks if the holder terminates.
Args:
lock_name: Unique resource identifier to lock (e.g., 'arbitrage/pool-weth-usdc').
owner_id: Identifier of the agent claiming the lock (e.g., 'agent-worker-1').
ttl_seconds: Maximum duration in seconds to hold lock before auto-release (default: 60, max: 600).
payment_signature: Optional x402 Base USDC transaction hash or developer mock key.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| owner_id | Yes | ||
| lock_name | Yes | ||
| ttl_seconds | No | ||
| payment_signature | No |