Skip to main content

Deposit Transactions

This documentation explains proper formatting for deposit transactions into Harbor across supported blockchain networks. Transactions must follow specific requirements to be recognized and processed.

Bitcoin and UTXO-Based Chains

Bitcoin, Dogecoin, Litecoin, and Bitcoin Cash transactions require a specific output structure.

Required Outputs (in order)

OutputDescription
VOUT0Payment to Harbor vault using the inboundAddress from the Quote response. The value must match the swap amount from the request.
VOUT1An OP_RETURN output containing the swap memo (the memo value from Quote response) encoded as hexadecimal data.
VOUT2Optional change output returning funds to user or change address.
OP_RETURN Size Limit

OP_RETURNs should be limited to 80 bytes. Transactions with longer OP_RETURNs will not be processed.

Refund Behavior

If a Bitcoin swap is refunded, the outbound goes back to the original sender address.

Invalid Transactions

The following transaction types will not be processed:

  • RBF (Replace-by-Fee) enabled transactions
  • OP_RETURN outputs exceeding 80 bytes
  • Missing OP_RETURN output

Ethereum and EVM-Based Chains

ERC20 or native asset deposits require interaction with the Router Contract using the depositWithExpiry function.

Function Parameters

ParameterDescription
vaultThe inboundAddress from Quote response
assetThe routerAsset value (the inbound token)
amountInbound amount in asset decimals (e.g., 6 for USDT)
memoThe Quote response memo value
expirationUnix timestamp (seconds) for transaction validity
Expiration Behavior

Deposits confirmed after the expiration timestamp trigger automatic refunds.

EVM Log Limit

Spam Protection

Transactions generating more than 50 EVM logs will fail processing as a spam protection measure.

Next Steps