Skip to main content
Fragmented money markets mean lower capital efficiency and worse rates. The SODAX money market pools lending liquidity on the hub while letting users act from any supported network, including HyperEVM. A user can supply tokens from HyperEVM and borrow on another network, or borrow into their HyperEVM account against collateral held elsewhere, without your product running its own lending infrastructure. Four actions, all through sodax.moneyMarket: supply, borrow, withdraw, repay. Each has a complete one-call form (handles the relay end-to-end) and a create*Intent form when you want the transaction only. The assets that work in the money market from HyperEVM are a subset of the HyperEVM swap list. Read the list at runtime, as below, or see Networks & Assets. As with swaps, only HyperEVM balances can be supplied or used to repay; funds in HyperCore must be transferred to HyperEVM first.

Supply from HyperEVM

Supplying an ERC-20 needs an allowance first, the same as any EVM network:
Native HYPE needs no approval when it is the supplied or repaid token.

Borrow to HyperEVM

dstChainKey and dstAddress default to the source, but any supported network can be the destination. That is the cross-network story in one parameter: collateral supplied from one network, borrowed liquidity delivered to another.
Borrowed and withdrawn funds land in the user’s HyperEVM wallet. The HyperCore deposit hook is a swap feature; money market deliveries do not go to HyperCore. withdraw and repay follow the same shape. Withdraw and borrow need no approval on any network; repaying with an ERC-20 needs an allowance, like supply.

Building a lending UI

sodax.moneyMarket.data exposes what you need for rates, positions, and health factors without extra indexing:
  • getReservesHumanized(): all reserves, human-readable.
  • getUserReservesHumanized(spokeChainKey, userAddress): a user’s positions.
  • formatReservesUSD(request) / formatUserSummary(request): USD-converted reserves and portfolio summaries.

Error handling

The module returns typed results. Discriminate on result.error.code ('RELAY_TIMEOUT', 'EXECUTION_FAILED', …) with structured context on result.error.context.
Full reference, including intent-only methods, gas estimation, and the per-method error-code table: Lend / Borrow (Money Market).