Skip to content

jeremylongshore/tons-of-skills-marketplace / plugins/crypto/aomi/skills/transact

aomi-transact

Verified

Build natural-language crypto agents, web3 assistants, and trading bots that read and write EVM chain state. Aomi turns prompts ("swap 1 ETH for USDC", "open a 3x GMX long", "bet $100 on Polymarket") into wallet-signed transactions on Ethereum, Base, Arbitrum, Optimism, Polygon, Linea — non-custodial, fork-simulated. Use when the user wants a crypto/DeFi agent, AI trading/wallet assistant, or on-chain execution against Uniswap, Aave, Lido, GMX, Hyperliquid, Polymarket, Binance, OKX, or 40+ other protocols. Trigger with prompts about swaps, lending, bridging, staking, perps, prediction markets, or any DeFi/CEX action needing a wallet signature. Account-abstraction aware with EIP-7702/4337 in the backend lane; local CLI signing is EOA. MUST NOT fabricate or echo credentials; values reach the CLI only when the user explicitly supplied them.

FileKindSize
SECURITY.mdmarkdown14.9 KB
SKILL.mdskill md10.1 KB
agents/openai.yamlconfig372 B
references/account-abstraction.mdmarkdown4.9 KB
references/apps.mdmarkdown15.9 KB
references/commands.mdmarkdown11.2 KB
references/drain-vectors.mdmarkdown4.7 KB
references/examples.mdmarkdown25.8 KB
references/gotchas.mdmarkdown6.7 KB
references/session.mdmarkdown6.4 KB
references/troubleshooting.mdmarkdown6.0 KB
references/workflows.mdmarkdown7.1 KB
templates/aomi-workflow.shexecutablescript8.1 KB

references/drain-vectors.md

View on GitHub
# Drain Vectors

Read this when:

- A simulation fails with an annotation like `recipient != msg.sender` or similar, and you need to know whether that's a guard-block or a real bug.
- You're constructing a new flow and need to know which calldata field the agent treats as the "drain" for a given protocol.
- The user types a prompt with a non-self recipient (*"swap and send to 0xFriend"*) and you need to predict whether the agent will let it through.

## What this is

A **drain vector** is the calldata field where a malicious prompt could redirect funds away from the user — `recipient` in Uniswap, `onBehalfOf` in Aave, `mintRecipient` in CCTP, `_to` in OP-stack bridges. The agent blocks these at simulation time when they don't equal `msg.sender`.

When you see a `Batch success: false` with a drain-vector annotation, it is **not** a transaction-construction bug. It is the agent's guard rejecting calldata that would route the user's funds to a non-self address. The skill's job is to surface the block to the user — not to reformulate the prompt to bypass it.

For example flows that hit these guards (Uniswap recipient, Aave onBehalfOf, CCTP mintRecipient, OP-stack `_to`), see the relevant section in [examples.md](examples.md).

## Reference table

| Protocol | Drain Vector | Notes |
|----------|--------------|-------|
| Uniswap V3 `exactInputSingle` / `exactOutputSingle` | `recipient` (word3) | Block at simulation if != msg.sender |
| Uniswap V2 `swapExactTokensForTokens` | `to` parameter | Same |
| 1inch v6 `swap` | `dstReceiver` inside `SwapDescription` tuple | Same |
| Sushi V2 `swapExactTokensForTokens` | `to` (recipient) | Same |
| Curve `exchange` | n/a — refunds msg.sender directly | No drain vector by design |
| Aave V3 `supply` | `onBehalfOf` | Same |
| Aave V3 `borrow` / `withdraw` | `to` | Same |
| Aave V3 `repay` | `onBehalfOf` | Same |
| Compound V3 `supplyTo` | `dst` | Same |
| Morpho `supply` | `onBehalfOf` (inside MarketParams call) | Same |
| CCTP `depositForBurn` | `mintRecipient` (bytes32, left-padded) | Same |
| Across `depositV3` | `recipient` (word1) | Same |
| Stargate `send` | `recipient` inside `SendParam` AND separate `refundAddress` | **Both** are drain vectors |
| Arbitrum native bridge `outboundTransferCustomRefund` | `_to` AND `_refundTo` | Both |
| OP-stack `bridgeETHTo` / `depositETHTo` (Base/Optimism) | `_to` | Plus `_to == address(0)` is a hard block (not just a warning) — bridging to zero permanently locks funds on L2 |
| zkSync Mailbox `requestL2Transaction` | `_contractL2` AND `_refundRecipient` | Both |
| LST tokens (stETH, wstETH, rETH, eETH, etc.) `transfer` / `transferFrom` | `_to` | Special-case block on the issued token, not on the staking call. The agent guards against attacker prompts like *"transfer my stETH to 0xdEaD"* even though stETH itself is a known Lido contract |

## How the guard fires

The agent runs `simulate_batch` against a forked chain before staging calldata to the wallet. When a drain vector is detected, the simulation result includes an annotation like:

```
Batch [1] failed: drain-vector at recipient != msg.sender
  step 1: exactInputSingle((USDC, WETH, 500, 0xdEaD..., 1_000_000, 0, 0))
  user:   0xUserAddress
  field:  recipient (word3)
```

The wallet never sees this calldata — it's rejected at the simulation gate. The skill should **surface the block** to the user. Two scenarios:

1. **The user typo'd or forgot their own address** → confirm with them ("did you mean to send to your own wallet?") and re-prompt with the corrected recipient.
2. **The user actually wanted to send to a different address** (a friend, a multisig, a contract) → the agent's default policy is conservative; the user can override only by re-prompting with explicit acknowledgment, and the skill should surface that the calldata is intentionally non-self before signing.

Do **not** attempt to bypass the guard by reformulating the prompt without the user's explicit redirect. Do not paste the exact same intent through a different app to evade the check.

## Hard blocks vs. soft warnings

Most drain-vector annotations are **soft warnings** — they fail simulation and ask for explicit confirmation. A few are **hard blocks** that cannot be acknowledged through:

- **`_to == address(0)`** on OP-stack bridges. Bridging to zero permanently locks funds on L2 with no recovery path. The agent fails simulation with a clear "L2 funds will be permanently unrecoverable" message. If the user typo'd, do **not** retry — surface the block and re-prompt for the correct address.
- **Token-level `transfer` to a known sink address** (`0x0`, `0xdEaD`, etc.) on a freshly issued LST. Special-case to prevent the staking-then-transfer attacker chain.

For the full per-protocol example flows that hit these guards, see [examples.md](examples.md).
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 323kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 323kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 323kUpdated Claude CodeCodexVerifiedInstall