Docs / Guides / Wallet and USDG
Guides

Wallet and USDG

Fund the escrow, withdraw and get paid.

How money works in Elyra today, what you can do from the panel, and what is not built yet.

Status: settlement is real on Robinhood Chain testnet with a worthless test token. Mainnet is disabled by default, the escrow contract has had no independent audit, and connecting your own wallet works but has only been exercised on a local test chain with a simulated wallet, not yet with a real wallet app. Do not put real funds anywhere yet.

The model#

Every node has its own wallet, generated on first start and stored in the data directory (.elyra/, or /var/lib/elyra for the service). That key signs receipts and payment vouchers automatically, which is why a browser wallet cannot sign per-request payments for you.

  • Prices are dollars per million tokens and USDG is a dollar stablecoin with 6 decimals, so there is no exchange rate or oracle.
  • ETH is used only for gas. The node wallet needs a little to redeem vouchers and to deposit.
  • Money sits in the escrow contract. A consumer deposits; for each verified answer the node signs a higher cumulative voucher; the provider redeems the latest one.

See your wallet#

Open Payments in the panel. It shows the network and chain id, the node wallet address (with an explorer link), the escrow contract and whether it is verified on Blockscout, ETH for gas, the token balance and your escrow deposit.

Set up on testnet#

  1. Fund the node wallet with testnet ETH from a faucet (links are listed in the Payments view).
  2. Deploy the escrow and a mock token, once:
bash
npm run chain:install
npm run chain:build
npm run chain:deploy:testnet
  1. In Payments, Network settings, paste the escrow address and save. The status changes from Settlement is simulated to On-chain settlement is live.
  2. Press Mint 100 test USDG (testnet only: the mock token has an open mint), then Deposit an amount. The panel approves and deposits in two transactions.

Fund from your own wallet#

Instead of moving tokens to the node wallet by hand, connect a wallet and deposit straight from it.

  1. Turn it on once, with a free project id from dashboard.reown.com: set ELYRA_REOWN_PROJECT_ID on the node (Configuration). In the Reown dashboard add the address you open the panel on (for example app.example.com) under the project's allowed domains.
  2. Open Payments. In Fund from your wallet press Connect wallet and pick MetaMask, Rainbow, Coinbase Wallet or any WalletConnect wallet (scan the QR with your phone).
  3. Enter an amount and press Deposit from my wallet. Your wallet asks you to approve the token once, then to confirm the deposit.
  4. On testnet, Get 100 test USDG in my wallet mints test tokens to you first.

What happens: your wallet pays and the escrow credits this node's address, because the node's own key signs the payments. So the deposit funds the requests this node makes. Only the node's key can withdraw it (see below). Your wallet never signs requests and never sees prompts.

The wallet component is large (about 1.3 MB compressed), so it loads only when you press Connect. It talks to Reown's WalletConnect services (relay, wallet list, verification) and, depending on the wallet you pick, to that wallet's own service. Without a project id none of this is loaded.

Withdraw#

Withdrawal is deliberately slow so a consumer cannot spend a deposit and pull it out before the provider redeems.

  1. Request withdraw starts a one-day timer (WITHDRAW_DELAY).
  2. After it unlocks, enter an amount and withdraw. CANCEL aborts.

withdraw pays the address that deposited, which is the node wallet. To move funds to a personal wallet, send them from the node wallet afterwards.

Get paid#

Providers redeem vouchers from the escrow and pay the gas. Set a payout address with ELYRA_PAYOUT=0x... so earnings land in a wallet you control rather than the node key (Configuration). See Sell capacity for credit limits and redemption.

Mainnet#

Disabled on purpose. Starting a node with --allow-mainnet unlocks Robinhood Chain mainnet (chain id 4663) and real funds. Do not do this before the escrow is audited and a deposit cap exists. One specific risk: the USDG issuer can burn balances from any address, including the escrow, so a deposit is not protected by the contract alone. The fork rehearsal and findings are in contracts/rehearsal-mainnet-fork.md.

Not built yet#

  • Withdrawing from the escrow straight to your own wallet. The contract pays the address that deposited, which for a wallet-funded deposit is the node.
  • Sign-in with Ethereum for remote admin, replacing the shared admin token.
  • A deposit cap and an audited escrow, required before mainnet.