Braid
Documentation

Portfolio intelligence to onchain execution.

Braid separates wallet state, market state, portfolio intent and transaction state so every stage stays inspectable and explicitly authorized.

WalletAddress · network · balances
Portfolio dataSupported positions
Price dataValuation · freshness
Allocation engineCurrent · target · delta
RoutingQuotes · constraints
Wallet authorizationApproval · signature
Onchain executionSubmission · confirmation
ReconciliationUpdated portfolio

Overview

Braid reconstructs a portfolio from supported wallet balances and price data, calculates allocation, accepts a validated target and turns the resulting delta into a reviewable execution plan.

Wallet connection

The application uses the EIP-1193 browser-provider interface. Connection requests an account and chain identifier through eth_requestAccounts and eth_chainId. Account and network changes update the interface immediately.

Authorization boundary

Connection does not grant token allowance, sign a transaction or move funds. Approval and portfolio execution remain separate wallet actions.

Portfolio model

Every supported position contains an asset identifier, balance, decimals, price state, normalized value and allocation weight. Missing prices remain explicit and are never silently converted to zero.

positionValue = normalizedBalance × price allocation = positionValue / portfolioValue targetValue = portfolioValue × targetWeight tradeDelta = targetValue - currentValue

Execution lifecycle

  • Validate target weights.
  • Calculate value deltas.
  • Build and review an available route.
  • Request token approval when required.
  • Submit the portfolio transaction through the wallet.
  • Wait for network confirmation.
  • Refresh balances and reconstruct the resulting portfolio.

Security boundaries

Braid keeps observable portfolio state, portfolio intent, temporary quotes and confirmed transaction state distinct. A quote can expire without changing the target; a submitted transaction is not considered final until confirmed; an expected portfolio never overwrites the actual reconciled state.

Development

npm install npm run dev -- -p 3001 npm run build npm run start

The interface is built with Next.js 15, React 19, TypeScript, CSS Modules and Phosphor icons. Motion uses GPU-friendly transforms and opacity with reduced-motion support.