Stocks and indices

Buy and sell tokenized stocks on Base with USDC, save target weights as a local index and rebalance your holdings toward them in one transaction.

On this page

Stocks#

Aero trades ten tokenized stocks on Base, chain 8453, against USDC at 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913. Every stock command fails on other chains with "Tokenized stocks are available on Base only, chain 8453".

SymbolCompanyToken address
NVDAcNVIDIA0xb20000000000000000000078ee7ce2fe4908108c
AAPLcApple0xb200000000000000000000c2e324d24d7eecd1fb
GOOGLcAlphabet0xb2000000000000000000002d0ba3164cc74f58b7
METAcMeta0xb2000000000000000000008bc8786b856e61707c
AMZNcAmazon0xb200000000000000000000d9192b6b456483c2e8
MSFTcMicrosoft0xb200000000000000000000ab99cfa739e253872b
TSLAcTesla0xb2000000000000000000001e800a7f5189430cd0
MSTRcStrategy0xb2000000000000000000004884b426556b92883d
SNDKcSandisk0xb200000000000000000000397293cb8cda9a10c5
SPCXcSpaceX0xb2000000000000000000007b9fcbd005511acbd5

--stock accepts the symbol, the symbol without the trailing c such as NVDA, or the token address, in any case.

List#

aero stocks list

For each stock, price_usdc is the current quote for selling one token into USDC. It is indicative, not an order price. With a connected wallet or --wallet, balance shows your holding. A stock that cannot be quoted has its reason in error and does not stop the others.

Buy and sell#

aero stocks buy --stock NVDAc --amount 25 --dry-run
aero stocks sell --stock NVDAc --amount 0.1 --dry-run

On buy, --amount is the USDC you spend. On sell, it is the number of stock tokens you sell. Both are plain decimals with no more decimal places than the token has. USDC has 6. Aero checks your balance before building the plan and stops with "Insufficient USDC balance", or the stock's symbol, when it is short.

--slippage defaults to 0.01. The plan approves the input token to Permit2 and Permit2 to the swapper when needed, then swaps. The summary shows the amount in, the expected amount out and the minimum out. Remove --dry-run to review and sign through the normal flow in Transactions.

Indices#

An index is a saved list of target weights. It is a local file, not a token, vault or fund, and saving or deleting it moves no assets.

Save weights#

aero index create --name tech --allocations 'NVDAc=50,AAPLc=50'
aero index list
aero index show --name tech
aero index update --name tech --allocations 'NVDAc=0,AAPLc=100'
aero index delete --name tech
  • Names are 1 to 64 letters, digits, hyphens or underscores, starting with a letter or digit.
  • --allocations is a comma-separated list of SYMBOL=percent. Each percent is 0 to 100 with at most two decimal places, each stock appears once, and the total must be exactly 100.
  • A stock at 0 is sold when you rebalance. Keep an exiting stock at 0 until it is sold. A stock left out of the list is ignored, not sold.
  • create fails if the name exists. update fails if it does not.

Indices are stored as <name>.json in ~/.config/aero/indices, or in AERO_INDEX_DIR when set.

Rebalance#

aero index rebalance --name tech --cash 100 --dry-run

Rebalancing reads the saved weights and trades toward them:

  1. Every unit your wallet holds of each stock in the index counts, valued at a current quote for selling the whole holding into USDC.
  2. --cash adds that much USDC on top, default 0. Other USDC in the wallet is not touched.
  3. Target values are the total times each weight.
  4. Overweight stocks are sold down. The budget for buys is --cash plus the minimum proceeds of those sells, and it is split across underweight stocks in proportion to how far each is below target.

Stocks outside the index, staked assets and liquidity positions are not part of the calculation. Two indices that share a stock share the same holding. If the index holds nothing and --cash is 0, Aero stops with "No index holdings. Add a USDC contribution to fund this index." Fees, slippage and token precision can leave small weight differences and some USDC.

The summary shows the portfolio value in USDC, the added USDC, each stock's current and target percentage, and every trade with its minimum output. An index already on target prints "Already balanced. No transactions needed."

The CLI rebalances saved indices only. To try weights without saving them, use the Rebalance index form in the TUI.

One transaction for the whole basket#

All sells and buys go into a single swapper transaction. If any leg fails, the whole basket reverts. Before it, the plan adds approvals for each input token, covering the combined amount across legs. Approvals that confirmed before a failed basket stay on chain. Nothing runs on a schedule. Rebalancing happens only when you run the command.

In the TUI#

Open aero tui and pick Stocks or Indices from the home menu. The Stocks screen asks you to switch to Base when you are on another chain.

Stocks keyAction
up, downSelect a stock
b or EnterOpen the Buy stock form for the selected stock
sOpen the Sell stock form
hShow only stocks you hold. Needs a wallet.
oSort by catalog order, company name or holding value
/Search by symbol or company. Submit an empty search to clear it.
ctrl+rReload quotes and balances
EscBack

The Indices screen lists saved indices with a weight bar per stock. Enter edits the selected index, n creates one, r switches to Base and opens the Rebalance index form with the saved weights, and d deletes the weights after a confirmation.

Editor keyAction
up, downMove between the name row and the stocks
EnterName a new index, or type an exact weight for the selected stock
SpaceAdd the selected stock at 1%, or remove it
left, rightLower or raise the weight by 1%
eSplit 100% equally across stocks with a weight above 0. Stocks at 0 stay at 0.
fGive the selected stock whatever percentage remains
sSave
rSave and open the Rebalance index form
EscCancel

The editor shows the allocated total and any remainder or excess, and the total must be 100% to save. When you edit a saved index, a stock you remove is saved at 0 so the next rebalance sells it. The Rebalance index form takes target weights, optional added USDC, and slippage under More options, then builds the same plan as the CLI.