Markets powered by Dolomite
Dolomite organizes each supported asset into its own market, giving users a clear way to supply, borrow, and manage positions across a range of tokens. Each market is built around a specific supported asset, making it easy to understand what users are interacting with when they deposit or withdraw. In this guide, USD1 is accessed through its Dolomite market.Resources
Dolomite
Explore Markets powered by Dolomite.
Get started with Privy
Set up Privy and create embedded wallets for your app.
Deposit USD1 into a Dolomite market
1
1. Configure addresses
Set up the USD1 token address, the Dolomite Deposit Router, and the USD1 market ID. The example below uses Ethereum Mainnet:
2
2. Approve the Dolomite router to spend USD1
Use viem’s
encodeFunctionData to encode the approval, and Privy’s useSendTransaction to send it:3
3. Deposit USD1 into the market
Use viem to encode the
depositWei call and Privy’s useSendTransaction to send it:Withdraw USD1 from a Dolomite market
CallwithdrawWei on the Dolomite Deposit Router to pull USD1 back from the market to the user’s wallet. Pass the full wei amount to withdraw, or use a max value to exit entirely.
Key integration tips
- Always approve first: Your app must grant ERC-20 approval to the Dolomite Deposit Router before any deposit.
- USD1 uses 18 decimals: Use
parseUnits('100', 18)for amounts. - Market IDs identify assets: The
_marketIdparameter (1for USD1 in this example) tells Dolomite which market to deposit into or withdraw from. Dolomite uses ascending numerical market IDs rather than token addresses to identify markets. Use_isolationModeMarketId = 0for standard (non-isolated) assets. - Account number: Dolomite tracks balances per account number. Use
0for the default account, or pass a custom value to support multiple sub-accounts per wallet. - Balance check flag: On withdrawal,
_balanceCheckFlag = 1checks that the sender’s balance remains non-negative after the operation. Use0to skip checks on both sides. - Supported chains: This guide uses Ethereum Mainnet. Dolomite is also deployed on Arbitrum — market IDs and router addresses differ per chain.
Conclusion
Privy makes it straightforward to build secure access to markets powered by Dolomite. For advanced use cases, refer to Dolomite, or reach out in Slack.Your app is now ready to deposit USD1 into a Dolomite market using Privy embedded wallets!

