# 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`](https://docs.xverse.app/sats-connect/spark-methods/flashnet-trading/spark_flashnet_getjwt) → authenticate your user with Flashnet
* [`spark_flashnet_signIntent`](https://docs.xverse.app/sats-connect/spark-methods/flashnet-trading/spark_flashnet_signintent) → 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`](https://docs.xverse.app/sats-connect/spark-methods/flashnet-trading/spark_flashnet_executeswap) & [spark\_flashnet\_executeRouteSwap ](https://docs.xverse.app/sats-connect/spark-methods/flashnet-trading/spark_flashnet_executerouteswap) &#x20;
* Launch new **trading pools** with [`spark_flashnet_createCPPool`](https://docs.xverse.app/sats-connect/spark-methods/flashnet-trading/spark_flashnet_createcppool) , [`spark_flashnet_createBondingPool`](https://docs.xverse.app/sats-connect/spark-methods/flashnet-trading/spark_flashnet_createbondingpool) and [`spark_flashnet_confirmInitialDeposit`](https://docs.xverse.app/sats-connect/spark-methods/flashnet-trading/spark_flashnet_confirminitialdeposit)
* Orchestrate **liquidity provision** via [`spark_flashnet_addLiquidity`](https://docs.xverse.app/sats-connect/spark-methods/flashnet-trading/spark_flashnet_addliquidity) , [`spark_flashnet_removeLiquidity`](https://docs.xverse.app/sats-connect/spark-methods/flashnet-trading/spark_flashnet_removeliquidity) and [`spark_flashnet_ClawbackFunds`](https://docs.xverse.app/sats-connect/spark-methods/flashnet-trading/spark_flashnet_clawbackfunds)

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
