Bank vs Subaccount: where your money actually lives
Your dydx1… address has TWO separate balances under it — the bank (for fees and transfers) and the subaccount (for trading). Keplr only shows the bank. This is the #1 source of confusion for new users.
The two compartments
On dYdX v4, every address holds funds in two distinct cosmos-sdk modules. The bank module stores spendable USDC and native DYDX — the same way a standard Cosmos wallet works. The subaccounts module stores margin trading collateral, indexed by subaccount number (0, 1, 2, …).
These are NOT separate addresses. They are two ledgers under the same dydx1… address. Funds move between them via explicit messages — MsgDepositToSubaccount, MsgWithdrawFromSubaccount.
What Keplr shows
Keplr is a generic Cosmos wallet. It reads bank balances via the standard cosmos-sdk RPC endpoints. It does NOT query the subaccount module — that's a dYdX-specific extension.
So if you open Keplr after depositing your funds for trading, the balance reads near-zero. This is correct: the funds moved into subaccount 0. They show up on dydx.trade and in your Botely /app dashboard, not in Keplr.
What each compartment is for
Bank holds the DYDX you use to pay gas (every Cosmos transaction needs a gas fee). It also holds USDC you haven't deposited for trading yet — for example USDC you just bridged in from Ethereum.
Subaccount 0 holds USDC committed to margin trading. The bot reads its balance from there. Open positions and P&L all live in subaccount 0.
Most users only ever use subaccount 0. Subaccounts 1+ exist for isolating risk per strategy or per user, but Botely keeps everything in 0 in Phase 0.
How to move funds between them
Bank → Subaccount 0: "Deposit" on dydx.trade, or programmatically via MsgDepositToSubaccount. Required before the bot can trade.
Subaccount 0 → Bank: "Withdraw" on dydx.trade. Required if you want to swap USDC → DYDX for gas, or bridge funds out.