Overview
POCKET is a trading bot that runs inside your browser tab on Robinhood Chain (chain id 4663). You give it a wallet of its own and a small amount of ETH, pick a rule, and press Start. While the tab is open it reads pool prices from the public RPC, signs its own swaps on stock tokens, and logs every one with its tx hash and block.
It is an agent wallet with a hard limit: the bot only ever holds what you sent it. It has no approval on your main wallet and no way to ask for more. There is no POCKET server and no POCKET contract. The page is static files; everything live is a call from your browser to the chain.
The bot wallet
- Made in the browser.
ethers.Wallet.createRandom()runs in the page. The key is never sent anywhere. - Encrypted at rest. The key is encrypted with AES-GCM-256, using a key derived from your passphrase with PBKDF2-SHA256 at 310,000 rounds and a random 16-byte salt. Only the encrypted blob and the address go to
localStorage["pocket.v1"]. - In memory only while unlocked. Lock (or closing the tab) drops it. Unlock asks for the passphrase again.
- One tab at a time. The page takes a Web Lock per bot address, so a second tab can't run the same bot and fight over nonces.
- Export key shows the raw private key after the passphrase, so you can import the bot wallet into any wallet app. Forget bot deletes the blob and the log from this browser.
Lose the passphrase and the bot's money is gone: nobody can reset it. That is why it is for pocket money.
Funding and the cap
Fund… shows the bot address. "Send from my wallet" asks your browser wallet (MetaMask, Rabby and the like) to switch to Robinhood Chain, adding it if needed, and send the amount. That wallet becomes the default Sweep address. You can also send ETH to the address from anywhere.
The budget is the total ETH that came in. The bot notices new deposits on its own when it isn't mid-trade. The Pocket left bar is the ETH it still holds against that budget. Stock tokens it holds show in the Holding row with their value in ETH and their P&L against cost.
The cap is physical, not a setting: a buy is clipped to what the wallet holds, minus a 0.0001 ETH reserve kept back so it can always pay gas for its sells and the sweep. The page refuses to fund more than 0.5 ETH in one go.
Rules
| Rule | Fields | What it does |
|---|---|---|
| Buy the dip → take profit | token, dip %, TP %, size | Tracks the high since its last trade. Price ≤ high × (1 − dip) → buy size ETH. Price ≥ average entry × (1 + TP) → sell all. After each trade the high resets to that price, so it loops. |
| Buy now → take profit | token, TP %, stop %, size | Buys size ETH on the first poll. Sells all at entry × (1 + TP), or at entry × (1 − stop) if stop > 0. Then it reports "rule done" and pauses. |
| DCA every N minutes | token, size, every | Buys size ETH at once and every N minutes after, until less than half a buy is left. Never sells; use Sweep. |
Average entry = ETH spent ÷ tokens received, counting the pool fee, so a fill right at spot shows about −0.05% (or −0.30%) against spot. Changing the rule restarts it with a fresh reference price. The bot checks once per poll (15, 30 or 60 seconds).
Swaps
Every swap goes to the Uniswap Universal Router on Robinhood Chain, 0x8876789976decbfcbbbe364623c63652db8c0904, through the v3 pool for that token paired with WETH.
- Buy:
execute(0x0b00, …)wraps the ETH (WRAP_ETH) and swaps WETH → token (V3_SWAP_EXACT_IN) to the bot wallet. One transaction. - Sell:
execute(0x000c, …)swaps token → WETH into the router, paid through Permit2, then UNWRAP_WETH sends ETH to the bot. The first sell of each token also needs two one-time approvals: token → Permit2 (max) and Permit2 → router. The bot signs those itself. - Slippage: minOut = spot quote from slot0, minus the pool fee, minus 1%. If the pool would pay less, the router reverts and the bot logs the error. Nothing is spent but gas.
- Deadline: latest block time + 10 minutes.
- Gas: about 192k for a buy and 195k for a sell, around $0.006 at 0.02 gwei. The bot waits for one confirmation and logs the block and the gas paid.
Prices
Each poll is one JSON-RPC batch to https://rpc.mainnet.chain.robinhood.com: slot0() (selector 0x3850c7bd) of the five pools, the WETH/USDG pool 0x52e6…71Ca for the dollar price, and the block number. WETH is token0 in every pool, so
token per ETH = (sqrtPriceX96 / 2^96)^2 ETH per token = 1 / that USD per ETH = (sqrtPriceX96_usdg / 2^96)^2 × 10^12 // USDG has 6 decimals
That is the pool's spot price, the same one the swap starts at. Big trades move it; the bot's trades are pocket-sized against pools holding $93k to $1.3M.
Sweep
Sweep pauses the bot, then sends every stock token it holds with a plain ERC-20 transfer, then sends all the ETH minus the gas for that last transfer (a few millionths of an ETH of dust can stay behind). Tick "sell first" to swap each token to ETH before sending, with the same 1% slippage guard. The budget resets to zero afterwards.
Limits, read this
- Hot key. The key sits encrypted in this browser. Malware or a bad extension on your computer could get it while it's unlocked. Only fund what you're fine losing.
- Tab must stay open. Close it and the bot stops. Nothing is lost, it just stops trading. Browsers slow timers in background tabs to about once a minute, so polls run late when the tab isn't in front.
- It can lose money. A rule is a rule, not advice. Stock tokens trade around the clock here, including when the stock market is shut, and the pools can move hard on thin hours.
- Public RPC. If the RPC is slow or down, the poll logs an error and tries again next time.
- MEV. Swaps go to the public mempool of an L2 with a sequencer. The 1% minOut is the most a sandwich could take.
Contracts
| What | Address | Note |
|---|---|---|
| Universal Router | 0x8876789976decbfcbbbe364623c63652db8c0904 | Uniswap |
| Permit2 | 0x000000000022d473030f116ddee9f6b43ac78ba3 | canonical |
| WETH | 0x0bd7d308f8e1639fab988df18a8011f41eacad73 | |
| NVDA / WETH | 0x62AB521f71431f78ac374CdbadC6cda3c8916b6C | v3 0.05%, ~$1.29M |
| ANT / WETH | 0x6505175bF96502FF5e453b00B4108151b6f093Ed | v3 0.30%, ~$747k |
| SPY / WETH | 0xDDCBBa3666f578E3F09516f21Ff85BFee859AB5e | v3 0.05%, ~$565k |
| AAPL / WETH | 0x8bb3514e2204E1cDF3Ac149EFEe7Ff04D91B719f | v3 0.05%, ~$134k |
| TSLA / WETH | 0xA953CA88ff430e9487c60cA34d757414f4efdA07 | v3 0.30%, ~$93k |
| WETH / USDG | 0x52e65B17fB6E5BA00Ed806f37Afcd2DaA50271Ca | price only |
Liquidity as read on Nov 25 2026. Token contracts: NVDA 0xd060…9eec, TSLA 0x322f…3b2d, SPY 0x117c…4c0c, ANT 0xbbb6…b373, AAPL 0xaf3d…93f9 (all 18 decimals).
window.POCKET
The engine is plain JavaScript in pocket.js and sits on window.POCKET, so you can read it or drive it from the console.
| Call | Returns |
|---|---|
await POCKET.prices() | {block, ethUsd, sq:{SYM:BigInt}, eth:{SYM:number}, usd:{SYM:number}} |
POCKET.quoteBuy(sq, weiIn) / quoteSell(sq, tokIn) | spot output in wei, before fee |
POCKET.buyCalldata(token, weiIn, minOut, deadline) | router calldata (hex) |
await POCKET.encryptKey(pk, pass) / decryptKey(blob, pass) | the stored blob / the key |
new POCKET.Bot(signer, state, {log, save}) | .tick(rule, px), .buy(), .sell(), .sweep(to, {sellFirst}), .balances() |
POCKET.TOKENS, POCKET.CFG | pools, fees, addresses, RPC |
Save log downloads pocket-log.json: the bot address, the rule, the budget, every trade (side, token, ETH and token amounts in wei, P&L on sells, tx hash, block) and the last 300 log lines.
FAQ
Can the bot touch my main wallet? No. It's a separate wallet with its own key. You send it ETH; it never gets an approval on anything of yours.
What if I close the tab with tokens in the bot? They stay in the bot wallet. Open the page, unlock, and Start or Sweep.
Can I run it on my phone? The page works, but mobile browsers pause background tabs, so the bot only runs while the page is on screen.
Does POCKET take a fee? No. You pay network gas and the pool's own fee, and up to 1% slippage. That's all.