Monaco Protocol SDK v0.7.2
Vault Deposits
Monaco’s vault contract has been upgraded. Deposits now embed the application’sclient_id directly in the on-chain call. The public sdk.vault.deposit()
signature is unchanged — no code changes required for existing callers.
What changed
@0xmonaco/contracts: Vault ABI updated. ERC20 deposits now calldepositERC20(destination, clientId, token, amount); native SEI deposits usedepositNative(destination).@0xmonaco/core:sdk.vault.deposit()readsclientIdfromapplications.getApplicationConfig()and calls the new entrypoints. Public method signature unchanged.@0xmonaco/types:ApplicationConfigResponsenow includesclientId.
No migration required
sdk.vault.deposit(assetId, amount) behaves identically for callers.
Margin Transfers — Balance Coherence
Collateral movement now keeps wallet balances, WebSocket balance events, and UI state aligned after margin transfers.New balance event reasons
UserBalanceEvent.data.reason has two new values:
TransferCollateralResponse — new fields
Both transferCollateralToMarginAccount() and transferCollateralFromMarginAccount()
now return:
Use these to update the UI immediately without a separate refresh call.
useUserBalances behavior (React)
Spot-only balance events (order fills, locks) now preserve the existing
margin-collateral component of total_balance. A margin_transfer_in or
margin_transfer_out event replaces the full total. This prevents the wallet
total from briefly dropping after a spot event when collateral is also locked
in a margin account.

