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)
| Output | Description |
|---|---|
| VOUT0 | Payment to Harbor vault using the inboundAddress from the Quote response. The value must match the swap amount from the request. |
| VOUT1 | An OP_RETURN output containing the swap memo (the memo value from Quote response) encoded as hexadecimal data. |
| VOUT2 | Optional change output returning funds to user or change address. |
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
| Parameter | Description |
|---|---|
vault | The inboundAddress from Quote response |
asset | The routerAsset value (the inbound token) |
amount | Inbound amount in asset decimals (e.g., 6 for USDT) |
memo | The Quote response memo value |
expiration | Unix timestamp (seconds) for transaction validity |
Deposits confirmed after the expiration timestamp trigger automatic refunds.
EVM Log Limit
Transactions generating more than 50 EVM logs will fail processing as a spam protection measure.
Next Steps
- Learn about Refunds if your transaction fails
- Review the Router Contract addresses for EVM chains