Developers

Usecases

Every on-chain app has a home asset — the one token, on the one chain, the app actually runs on. A perps DEX wants USDC on Arbitrum for margin. A prediction market wants USDC on Polygon to price positions. A lending market wants the exact asset a user is supplying as collateral.

Users almost never arrive holding that. They show up with ETH on Base, USDT on BNB Smart Chain, or whatever the last app paid them. The Gateway Kit turns that mismatch into a non-event: the user pays with whatever they have, and their own wallet ends up funded with your home asset, on your chain, ready to use.

The on-chain app pattern

The Kit's deposit flow is a funding step you embed directly in your app. It is same-owner by design — funds settle to the connected user's wallet, not a custodial account, so the user keeps custody from start to finish.

A user pays with any token on any chain; Stridge routes and settles; the user's own wallet ends up holding the app's home asset.
  1. The user opens your deposit dialog and pays with any token on any supported chain.
  2. Stridge routes the payment — swap, bridge, or both — through the Universal Deposit Address model.
  3. The settled funds land in the user's own wallet, in your home asset on your chain.
  4. The user interacts with your app normally — they now hold exactly what it expects.
Note

The Kit settles to flows.deposit.destination.address. For the same-owner pattern that is the connected user's wallet — the address they just funded is the address your app reads from.

The integration

One provider configures the flow. asset is your home asset; flows.deposit.destination.address is the user's wallet.

App.tsx
import { StridgeProvider } from "@stridge/kit"
import { DepositDialog } from "@stridge/kit/deposit/dialog"

export function App({ userWallet }: { userWallet: `0x${string}` }) {
  return (
    <StridgeProvider
      gatewayKey={process.env.NEXT_PUBLIC_STRIDGE_GATEWAY_KEY!}
      // Your home asset — what every deposit settles into.
      // `networkId` is the Stridge network id — see Supported networks.
      asset={{ networkId: "9001", symbol: "USDC" }}
      // Same-owner: funds land in the user's own wallet.
      flows={{ deposit: { destination: { address: userWallet } } }}
    >
      <YourApp />
      <DepositDialog />
    </StridgeProvider>
  )
}

Call useDeposit().open() from any button — "Add funds", "Deposit", "Top up margin" — and the dialog handles the chain & token picker, routing, and the success state. The worked examples below change only asset and the copy around it.

See Gateway Kit for the overview, Provider for the full prop reference, and Theming & CSS variables for visual customization.

Who it's for

Any app where a user has to already be holding a specific asset before they can do the thing your app does.

App typeWhat the Kit funds
Lending & money marketsCollateral to supply, or the asset to repay a loan in
Perps & spot DEXsTrading margin or a spot balance
Prediction marketsPositions priced in the market's settlement token
Trading terminals & super-appsOne balance spanning perps, spot, and prediction
On-chain casinos & gamingA wager or chip balance
Sports bettingFunded bet slips

The pattern is identical across all of them — only the home asset changes.

Worked examples

Three integrations, one pattern. Each walks through the friction it removes, the StridgeProvider config, and how teams typically customize the UI to match their app.

Next

Was this page helpful?