A proof of concept demonstrating the integration of Soroswap and Defindex with Crossmint wallets on the Stellar network.
This POC showcases how to:
- Authenticate users using Crossmint's embedded wallet solution
- Swap tokens (XLM to USDC) via Soroswap's DEX on Stellar Testnet
- Deposit assets into Defindex vaults for DeFi strategies
- React 19 + TypeScript + Vite
- Crossmint SDK - Wallet authentication and transaction signing
- Stellar SDK - Blockchain interactions
- CSS Modules - Scoped styling with glassmorphism UI
- Node.js 18+
- pnpm (recommended) or npm
- A Crossmint API key (get one here)
-
Clone the repository
git clone <repository-url> cd crossmint-front-poc
-
Install dependencies
pnpm install # or npm install -
Configure environment variables
Copy the example environment file and add your Crossmint API key:
cp .env.example .env
Edit
.envand set your API key:VITE_CROSSMINT_API_KEY=your_crossmint_api_key_here -
Run the development server
pnpm dev # or npm run dev -
Open in browser
Navigate to
http://localhost:5173
- Click "Connect Wallet" to authenticate via Crossmint
- View your XLM and USDC balances on the dashboard
- Use "Swap XLM to USDC" to exchange tokens via Soroswap
- Use "Deposit to Defindex" to invest in DeFi strategies
src/
├── components/
│ ├── ui/ # Reusable UI components (GlassCard, Button, Input, etc.)
│ ├── wallet/ # Wallet-specific components (WalletHeader, BalanceCard)
│ └── views/ # Page views (Dashboard, SwapView, DepositView)
├── contexts/ # React contexts (NavigationContext)
├── hooks/ # Custom hooks (useWalletOperations)
├── styles/ # Global styles
└── types/ # TypeScript type definitions
This POC runs on Stellar Testnet. The following contract addresses are used:
- Soroswap Router:
CCMAPXWVZD4USEKDWRYS7DA4Y3D7E2SDMGBFJUCEXTC7VN6CUBGWPFUS - Defindex Vault:
CB4DY5JJNT6H56YAPIMN3HMPNW3RIH5RTN463XRCJEDG3AMRHFP23GSS - XLM Token:
CDLZFC3SYJYDZT7K67VZ75HPJVIEUVNIXF47ZG2FB2RMQQVU2HHGCYSC - USDC Token:
CBIELTK6YBZJU5UP2WWQEUCYKLPU6AUNZ2BQ4WWFEIE3USCIHMXQDAMA
This is a proof of concept and is not intended for production use. Use at your own risk.
PaltaLabs - Building on Stellar & Soroban
MIT