LogoLogo
  • ☠️Introduction
    • What is Clipper?
    • How Clipper Makes Money for LPs
    • How LPs Earn from Arbitrage
    • Clipper's Benchmark: No Impermanent Loss
      • Clipper vs. CPMMs vs. HODLing
      • Appendix: Math
    • Why Clipper Has Better Trading Prices
    • DAO Protocol Fees
    • DAO Governance
  • ⚔️How to Use Clipper
    • Liquidity Pools
      • Depositing & Withdrawing
      • Farming Pools
    • Trading
    • Community Adventures
    • FAQs
  • 🪙Governance Token
    • Community Governance
    • ⛵SAIL Primer
      • Clipper Fundamentals
      • DEX Market Structure
      • SAIL Supply & Circulation
      • SAIL Farming
      • veSAIL
      • Token Listings
  • 🏴‍☠️Disclaimers & Technical
    • Audits
    • Smart Contracts
      • Subgraph
        • Entities
        • Queries
    • Integrating with Clipper RFQ
      • Introduction
      • Guides
        • How to use clipper RFQ API?
        • Estimate Clipper Prices
        • Interacting with the Clipper Exchange contracts
        • Integration Examples
          • Swap Native token → Shorttail
          • Swap Shorttail → Native token
          • Swap Shorttail → Shorttail
          • Complete Swap Flow
      • API Reference
        • API v2
          • Overview
          • Pool v2
          • Quote v2
        • API v1
          • Overview
          • Pool
          • Quote
          • Sign
      • Troubleshooting & FAQs
    • Terms of Service
    • Privacy Policy
  • ⛵Come Aboard
    • Discord
    • Twitter
    • Github
Powered by GitBook
On this page
  • Complete swap flow
  • Swaps

Was this helpful?

  1. Disclaimers & Technical
  2. Integrating with Clipper RFQ
  3. Guides

Integration Examples

PreviousInteracting with the Clipper Exchange contractsNextSwap Native token → Shorttail

Last updated 2 months ago

Was this helpful?

Complete swap flow

If you want to see a complete flow to make a swap you can review this . In this example you can see the different steps.

  1. Get pool data

  2. Estimate Clipper Prices

  3. Create a quote

  4. Sign a quote

  5. Execute a transaction

Swaps

There are three kinds of assets:

  1. Shorttail: Assets on Clipper Pool

  2. Longtail: Assets not on Clipper Pool but can be traded through coves.

  3. ClipperLP: Underlying token representing fraction of clipper pool.

Given those three assets, there may be the following Swap combinations:

Core pool Swaps

🏴‍☠️
code
Native token → Shorttail
Shorttail → Native token
Shorttail → Shorttail