# Flashnet Trading

## ⚡ Flashnet

[Flashnet](https://docs.flashnet.xyz/introduction) is a **decentralized trading and liquidity protocol** built on Spark. It enables:

* Instant swaps between Spark BTC and Spark-based tokens
* Permissionless liquidity pools (constant product or bonding curve)
* Token launchpads powered by bonding curves

## :rocket: Build Trading Experiences on Flashnet&#x20;

With Sats Connect, you can integrate **Flashnet trading directly into your app**, while keeping users in control of their Spark wallet.

There are **two ways** to integrate Flashnet:

### 1️⃣ Orchestrate Flashnet calls yourself

Use the wallet for **secure authentication and signing** only:

* [`spark_flashnet_getJWT`](/sats-connect/spark-methods/flashnet-trading/spark_flashnet_getjwt.md) → authenticate your user with Flashnet
* [`spark_flashnet_signIntent`](/sats-connect/spark-methods/flashnet-trading/spark_flashnet_signintent.md) → request signed intents (swap, add/remove liquidity, create pools)

Your app handles the Flashnet API directly, while the wallet guarantees “What You See Is What You Sign” UX for the user.

### 2️⃣ Use Flashnet methods directly from Sats Connect

Let the wallet manage the full interaction with Flashnet, including transfers, JWT handling, intent signing, and submission.&#x20;

Your dApp only makes a single request, and the wallet orchestrates the entire flow:

* Trigger **swaps** via [`spark_flashnet_executeSwap`](/sats-connect/spark-methods/flashnet-trading/spark_flashnet_executeswap.md) & [spark\_flashnet\_executeRouteSwap ](/sats-connect/spark-methods/flashnet-trading/spark_flashnet_executerouteswap.md) &#x20;
* Launch new **trading pools** with [`spark_flashnet_createCPPool`](/sats-connect/spark-methods/flashnet-trading/spark_flashnet_createcppool.md) , [`spark_flashnet_createBondingPool`](/sats-connect/spark-methods/flashnet-trading/spark_flashnet_createbondingpool.md) and [`spark_flashnet_confirmInitialDeposit`](/sats-connect/spark-methods/flashnet-trading/spark_flashnet_confirminitialdeposit.md)
* Orchestrate **liquidity provision** via [`spark_flashnet_addLiquidity`](/sats-connect/spark-methods/flashnet-trading/spark_flashnet_addliquidity.md) , [`spark_flashnet_removeLiquidity`](/sats-connect/spark-methods/flashnet-trading/spark_flashnet_removeliquidity.md) and [`spark_flashnet_ClawbackFunds`](/sats-connect/spark-methods/flashnet-trading/spark_flashnet_clawbackfunds.md)

All of these flows are presented through the Xverse wallet with clear review screens, so users:

* See a clear breakdown of what they’re approving
* Sign transactions with their Spark keys
* Stay fully self-custodial throughout the process


---

# 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.xverse.app/sats-connect/spark-methods/flashnet-trading.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.
