What this looks like on Hedera
- Source: the intent transaction is an EVM transaction sent through Hedera’s JSON-RPC relay and signed by the user’s ECDSA key.
ChainKeys.HEDERA_MAINNET('hedera') identifies the network everywhere in the SDK. - Reach: any solver-compatible asset on any SODAX network is a valid destination, 166 assets today. The on-Hedera asset list only bounds what users hold on Hedera itself, not what they can swap into.
- Tokens: Hedera assets are native HTS tokens, addressed by the EVM form of their token ID. USDC is token
0.0.456858, which the SDK lists as0x000000000000000000000000000000000006f89a. Read addresses from the SDK config; never convert them by hand. - Settlement: output lands on the destination network at
dstAddress. Swaps into Hedera settle as HTS balances on the recipient’s EVM address, which must be able to receive the token: see Receiving tokens on Hedera.
Approvals
swap() does not approve the input token for you. HBAR is the native token and needs no approval. Every HTS token does: SODAX’s asset manager pulls it through the token’s ERC-20 interface, so check the allowance first and approve when it falls short.
params is the same intent params object you pass to swap().
Quoting
The solver API quotes both directions:getQuote deducts any configured partner fee before quoting, so quoted_amount is the net output the user actually receives.
Fees
Using SODAX is free to integrate. Two fees can apply to a trade:- Base fee: a fixed 0.1% of the input, taken by the protocol. Not configurable; compute it ahead of time with
getSolverFee(inputAmount). - Your fee: optional platform fee on top, set by you and paid to you. It is the only fee you control. Configure it at SDK setup and check it with
getPartnerFee(inputAmount). See Monetize SDK.
Executing
Preferswap(). It creates the intent on Hedera, verifies it landed, submits it to the relay, waits for the packet on the hub, and notifies the solver. The Quickstart has the complete call. Track progress with getStatus(request), and cancel unfilled intents with cancelIntent. Limit orders (intents without deadlines) work from Hedera too, via createLimitOrder.
Orchestrating manually with createIntent and submitIntent works the same as on any EVM network: Hedera intents need no relay extra data.
Receiving tokens on Hedera
On most EVM networks any address can receive any token. On Hedera an account receives an HTS token only if it is associated with that token, or still has a free automatic association slot. A delivery to an account that is neither fails. This applies whenever Hedera is the destination: a swap into Hedera, or a money market borrow or withdraw delivered to Hedera. HBAR itself needs no association. Whether an account qualifies depends on how it was created:
Check before you submit, using Hedera’s public mirror node. It accepts an EVM address directly:
false, ask the user to associate the token before you submit. From an EVM wallet that is one transaction: every HTS token exposes associate() at its own address (HIP-719), signed by the account that will receive it.
Error handling
Operations returnResult<T> instead of throwing. The core methods (swap, createIntent, postExecution) return a typed SodaxError union you can switch on by error.code.
Full reference, including raw mode, limit orders, cancellation, and the complete error-code table: Swaps.