fKALE is a platform that allows users to leverage their future KALE token expectations without selling their XLM. Users can provide 1:1 XLM collateral to mint fKALE tokens at a 1000:1 ratio, trade them with KALE to be used their ongoing farming operations, maintaining exposure to XLM volatility while accessing liquidity from their anticipated KALE farming rewards.
Trade your future $KALE - fKALE enables users to:
- π Maintain XLM Exposure: Keep your XLM bags while accessing liquidity
- π° 1:1 Collateral Efficiency: Provide 1 XLM, receive 1000 fKALE tokens
- πΎ Monetize Future Farming: Trade expected KALE rewards before you farm them
- β‘ Instant Liquidity: Get immediate access to capital without selling your XLM
- π Volatility Participation: Stay exposed to XLM price movements while leveraging future yields
This project has been finalized with the following improvements:
- β Security Fixes: Resolved critical npm vulnerabilities (sha.js, axios, vite, js-yaml)
- β Type Safety: Fixed 40+ TypeScript errors, improved type definitions throughout codebase
- β Code Quality: Enhanced ESLint configuration with proper type checking
- β Build Optimization: Added code splitting for better performance (vendor, stellar-sdk, debug chunks)
- β Bundle Size: Optimized build output with manual chunking strategy
- β Production Build: Fully tested and verified Vercel deployment-ready build
- β
Clean Codebase: Removed unsafe
anytypes, added proper error handling - β Developer Experience: Fixed all build warnings and configuration issues
# Install dependencies
npm install
# Build for production
npm run build
# Preview production build
npm run preview
# Deploy to Vercel
vercel deploy --prodBuild Output:
- Main bundle: ~805 KB gzipped (optimized with code splitting)
- WASM module: ~736 KB gzipped (Stellar XDR processing)
- Total assets: 4 files (HTML, CSS, JS chunks, WASM)
- Build time: ~15 seconds
- Portfolio Overview: Real-time display of XLM, fKALE, and KALE balances
- Interactive Feature Cards: Quick access to all platform functions
- Educational Content: Clear explanations of how fKALE works
- Theme Toggle: Dark/Light mode support for optimal user experience
- Responsive Design: Works seamlessly on desktop and mobile devices
- Smart Input Validation: Real-time balance checking and error handling
- Live Rate Calculator: Automatic calculation of fKALE tokens to receive (1000:1 ratio)
- Transaction Preview: Detailed breakdown of collateral, fees, and lock period
- MAX Button: One-click option to use maximum available XLM (minus fees)
- Progress Indicators: Loading states and transaction status updates
- Position Tracking: Immediate balance updates after successful minting
- Dual Functionality:
- Deposit KALE tokens to enable redemptions for others
- Redeem your fKALE tokens for KALE at 1:1 ratio
- Pool Status: View available KALE in the redemption pool
- Fee Earning: Earn fees by providing KALE liquidity
- Instant Redemption: When KALE is available, redeem fKALE immediately
- Comprehensive Overview: View all active positions and collateral
- Lock Period Tracking: Monitor 30-day lock period countdown
- Withdrawal Eligibility: Check when XLM can be withdrawn
- Position Health: Monitor collateral ratios and position status
- Transaction History: View all minting, redemption, and withdrawal activities
- Contract Interaction: Direct interface to all contract functions
- Real-time Validation: Input validation with immediate feedback
- Transaction Simulation: Preview transactions before execution
- Contract Metadata: View complete contract schemas and functions
- Developer Tools: JSON viewers, XDR utilities, and error diagnostics
- Glass Morphism Design: Modern translucent cards with backdrop blur
- Smooth Animations: Professional fade-in effects and hover transitions
- Brand Identity: Cohesive fKALE branding with custom color palette
- Error Boundaries: Graceful error handling with user-friendly messages
- Accessibility: Keyboard navigation and screen reader support
- Performance Optimized: Fast loading with skeleton states and lazy loading
- fKALE Token Contract:
CC3A4X5YBD7YN2WFRECSQPA3N4JGGWOMSXF7ED5ZCQANMTRVHH6CRHJN - Forwards Contract:
CDP2A3JLSFR4G3SQWKAYZMRUN7XN5K3AQZ2FY5QFZ3X2T32VLUDHW4ES - KALE SAC:
CAAVU2UQJLMZ3GUZFM56KVNHLPA3ZSSNR4VP2U53YBXFD2GI3QLIVHZZ - XLM SAC:
CDLZFC3SYJYDZT7K67VZ75HPJVIEUVNIXF47ZG2FB2RMQQVU2HHGCYSC
The fKALE token contract is a Stellar Asset Contract (SAC) compliant fungible token that represents claims on future KALE tokens. Key features:
- Mintable: New fKALE tokens are minted when users provide XLM collateral
- Burnable: fKALE tokens are burned when redeemed for KALE
- Transferable: Users can trade fKALE tokens freely
- 1:1 KALE Backing: Each fKALE token represents a claim on 1 KALE token
The forwards contract manages the collateral system and forward positions. Core functions:
- Position Management: Creates and tracks user positions with XLM collateral
- Collateral Handling: Manages 1:1 XLM collateral for fKALE minting
- Redemption Logic: Facilitates fKALE to KALE redemption when KALE is available
- Liquidation System: Handles position liquidation and collateral distribution
Current MVP Features:
- Shared collateral pool for all users
- Simplified position tracking
- Basic redemption mechanism
- 30-day lock period for all positions
- Fixed 1000:1 XLM to fKALE exchange rate
- User-Specific Pools: Individual collateral management per user
- Dynamic Pricing: Market-driven exchange rates for fKALE
- Variable Lock Periods: User-selectable lock durations (7, 30, 90, 180 days)
- Partial Withdrawals: Allow partial collateral withdrawal before maturity
- Position Transfers: Enable trading of locked positions
- Automated Market Maker: XLM-fKALE trading pool with dynamic pricing
- fKALE-KALE Pool: Direct redemption pool with liquidity incentives
- Yield Farming: Liquidity provider rewards and staking mechanisms
- Cross-Chain Integration: Bridge to other blockchain networks
- Institutional Integration: API for institutional traders and market makers
- Dynamic Collateral Ratios: Risk-adjusted collateral requirements
- Liquidation Engine: Automated position liquidation system
- Insurance Fund: Protocol insurance for extreme market events
- Reflector Integration: Real-time price feeds for accurate valuations
- Stress Testing: Continuous monitoring and risk assessment
- Lending Protocols: Use fKALE as collateral in lending platforms
- Synthetic Assets: Create synthetic KALE derivatives
- Options Trading: fKALE options and futures contracts
- Perpetual Swaps: Leveraged trading of fKALE positions
- Cross-Protocol Yield: Optimize yields across multiple DeFi protocols
- Node.js 18+
- Rust with
wasm32v1-nonetarget - Stellar-compatible wallet (Freighter, Albedo, etc.)
- Testnet XLM for transactions
- Clone the repository
git clone https://github.com/kaankacar/fkale.git
cd fkale- Install dependencies
npm install
rustup target add wasm32v1-none- Set up environment
cp env.example .env
# Edit .env with your configuration- Start development server
npm run dev- Visit the application
http://localhost:5173
npm run build:contractsnpm run test:contractsnpm run deploy:fkale
npm run deploy:forwards
npm run setup:complete- Connect Wallet β Link your Stellar wallet to the platform
- Fund Account β Ensure sufficient XLM for transactions and collateral
- Mint fKALE β Lock XLM collateral and receive fKALE tokens
- Trade or Hold β Use fKALE for immediate liquidity or hold for KALE redemption
- Redeem KALE β Exchange fKALE for KALE when available (1:1 ratio)
- Withdraw Collateral β Reclaim XLM after lock period and sufficient KALE delivery
Liquidity Seeker
- Lock XLM β Mint fKALE β Sell fKALE β Maintain XLM exposure β Profit from XLM appreciation
KALE Farmer
- Buy fKALE β Hold until KALE delivery β Redeem fKALE for KALE β Benefit from KALE value
Arbitrage Trader
- Monitor fKALE prices β Mint when premium exists β Sell at higher prices β Profit from spreads
- MVP Status: Current implementation is for demonstration only
- Shared Pools: Not suitable for production use
- Testnet Only: Do not use real funds without proper auditing
We welcome contributions! Please:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Add tests for new functionality
- Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
- GitHub Issues: Report bugs or request features
- Documentation: Soroban Documentation
- Community: Stellar Discord
- Updates: Follow development progress on GitHub
Built with β€οΈ on Stellar | fKALE Protocol | "Trade your future $KALE"