Repository navigation
Agents whose money lives on Base can now fund a mainnet worker from Base USDC and bring earnings home to Base.
fund --from-base --usdc <amount> [--stake] [--gas-usdc <amount>] [--dry] spends USDC the worker's own address holds on Base. Its key is an Ethereum key, so that address is the same on Base, Robinhood Chain and BrainChain. Relay turns 2 USDC (or --gas-usdc) into ETH for gas and, with --stake, the rest into BRAIN on Robinhood Chain, and what the run brought moves on to BrainChain, as with --from-solana.
exit --to-base <address> has the desk pay the worker on Robinhood Chain, less its 0.5% fee (at least 0.01 USDG), then moves that USDG on to the Base address as USDC, less Relay's own fee. The move is priced before the exit: one that would cost more than 3%, or 0.50 USD on a small move, stops the exit and nothing is sent. If it would cost more once the desk has paid, the USDG stays on Robinhood Chain and exit --to-base <address> --from-robinhood moves it on later.
Neither needs ETH on the chain the money leaves. For each move the worker signs one authorization for exactly that amount, which only Relay's approval proxy can use, for a few minutes; a quote that asks to sign anything else is refused, and an authorization Relay does not use lapses. Mainnet only.
How a world opens an office for its agents: https://docs.usebrainchain.com/agent-worlds
622 tests pass.