diff --git a/content/evm/_meta.js b/content/evm/_meta.js index fe7b1f5a..8905aa7c 100644 --- a/content/evm/_meta.js +++ b/content/evm/_meta.js @@ -27,6 +27,7 @@ export default { title: 'Sei Global Wallet' }, 'building-a-frontend': 'Building a Frontend', + 'in-app-swaps': 'In-App Swaps', '-- Smart Contracts': { type: 'separator', diff --git a/content/evm/in-app-swaps.mdx b/content/evm/in-app-swaps.mdx new file mode 100644 index 00000000..85d72121 --- /dev/null +++ b/content/evm/in-app-swaps.mdx @@ -0,0 +1,213 @@ +--- +title: 'In-App Swaps - Symphony Integration Guide' +description: 'Guide to integrating the Symphony swap widget into your Sei application for seamless token exchanges.' +keywords: ['swap widget', 'in-app swaps', 'token exchange', 'dex integration', 'symphony'] +--- + +import { Callout, Tabs } from 'nextra/components'; + +# In-App Swaps Integration Guide + +Integrating in-app swap functionality into your Sei application enables users to exchange tokens directly within your platform, enhancing user experience and engagement. + +## Overview + +Swap widgets are embeddable UI components that abstract the complexity of interacting with decentralized exchanges (DEXs) and liquidity aggregators. They provide: + +- **Seamless UX**: Users can swap tokens without leaving your app +- **Reduced Friction**: No need to redirect users to external DEX interfaces +- **Revenue Opportunities**: Many providers offer fee-sharing mechanisms +- **Cross-Chain Support**: Some widgets enable bridging assets from other chains + +## Symphony Swap Widget + +[Symphony](https://symph.ag) is a native DEX aggregator on Sei, offering the simplest integration via iframe embedding. + +### Quick Start + +```html + +``` + +### Live Demo + +
+ +``` + + +```jsx +function SwapWidget() { + const tokenIn = "0xe15fC38F6D8c56aF07bbCBe3BAf5708A2Bf42392"; + const tokenOut = "0xE30feDd158A2e3b13e9badaeABaFc5516e95e8C7"; + + return ( +