# Submarine swaps

**Submarine swaps** are trust-minimized atomic swaps of offchain stablecoins for onchain stablecoins. A payment secured by an HTLC is routed over the BITNET to a service provider who creates an onchain output paying the same HTLC. The onchain receiver can settle the HTLC to claim its funds, allowing the BITNET HTLCs to be settled like normal.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.xft.finance/learn/opcodes/submarine-swaps.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
