Developers

Bridge Integration

For wallets and dApps that want to move $STONKBROKER without sending users to the bridge UI. All of it is plain contract calls against the canonical Arbitrum bridge contract set.

Deposit flow

  1. 1Check the allowance of the $STONKBROKER ERC-20 for the ERC20Inbox, and approve if needed.
  2. 2Call depositERC20(uint256 amount) on the inbox from the user’s address.
  3. 3Poll the child chain for the balance increase — the credit lands at the same address, typically within a minute.
const amount = parseEther("100");

await wallet.writeContract({
  address: TOKEN, abi: erc20Abi, functionName: "approve",
  args: [ERC20_INBOX, amount],
});

await wallet.writeContract({
  address: ERC20_INBOX, abi: erc20InboxAbi,
  functionName: "depositERC20", args: [amount],
});

Withdrawal flow

  1. 1On the child chain, call ArbSys.withdrawEth(destination) at 0x…0064 with the amount as native value.
  2. 2Read the L2ToL1Tx event from the receipt to get the withdrawal position and parameters.
  3. 3Wait until the assertion covering that block is confirmed on Robinhood Chain (minutes, under fast confirmation).
  4. 4Build the Merkle proof with NodeInterface.constructOutboxProof, then call Outbox.executeTransaction(...) on Robinhood Chain.
// 1. initiate on StonkBrokerChain
await wallet.writeContract({
  address: "0x0000000000000000000000000000000000000064",
  abi: arbSysAbi,
  functionName: "withdrawEth",
  args: [destination],
  value: parseEther("5"),
});

// 2. later, prove and claim on Robinhood Chain
const proof = await childClient.readContract({
  address: "0x00000000000000000000000000000000000000C8",
  abi: nodeInterfaceAbi,
  functionName: "constructOutboxProof",
  args: [size, position],
});

await parentWallet.writeContract({
  address: OUTBOX, abi: outboxAbi,
  functionName: "executeTransaction",
  args: [proof, position, caller, destination, l2Block, l1Block, timestamp, value, data],
});

Using the Arbitrum SDK

Because StonkBrokerChain is a standard Orbit chain, @arbitrum/sdk handles deposits, withdrawal status, and proof construction for you once you register the chain’s network object.

import { registerCustomArbitrumNetwork } from "@arbitrum/sdk";

registerCustomArbitrumNetwork({
  chainId: 0, // TBA
  parentChainId: 4663,
  name: "StonkBrokerChain",
  isCustom: true,
  nativeToken: TOKEN,        // $STONKBROKER on Robinhood Chain
  ethBridge: { bridge: BRIDGE_ADDR, inbox: ERC20_INBOX, outbox: OUTBOX,
               rollup: ROLLUP, sequencerInbox: SEQUENCER_INBOX },
});

UX guidance

  • Show the two-transaction shape of a deposit (approve, then deposit) so users do not stop after the approval.
  • Surface withdrawal state as three stages — initiated, confirmed, claimable — and keep the claim button available across sessions.
  • Warn users on the child chain that gas is $STONKBROKER; a “0 ETH” wallet notice is expected and harmless.

StonkBrokers is experimental software. Nothing in these docs is financial advice. Stock token swaps are restricted in the United States region.

© 2026 Clutch Labs LLC. All rights reserved.