Nusa Protocol is a decentralized, cross-chain local stablecoin lending hub built to empower users across the world to lend and borrow stablecoins backed by Real World Assets (RWA) — all natively integrated within the Farcaster ecosystem.
Our stack combines:
- Frontend Mini App — an interactive Farcaster app built with Next.js.
- Smart Contracts — the cross-chain lending engine powered by LayerZero V2.
- Indexer — real-time on-chain data aggregation for analytics and UI.
├── nusa-fe/ # Frontend (Next.js Farcaster Mini App)
├── nusa-sc/ # Smart Contracts (Solidity + Foundry)
└── nusa-indexer/ # Data Indexer (Ponder + PostgreSQL)
Each subproject can run independently, but together they form the full Nusa Lending Protocol.
Tech Stack
- Framework: Next.js 15 (App Router)
- Language: TypeScript
- UI: Tailwind CSS, Framer Motion, GSAP
- Web3: Wagmi, Viem, RainbowKit
- Farcaster SDK: MiniApp SDK v0.2.0
Highlights
- Native Farcaster Mini App experience
- Smooth GSAP animations & responsive UI
- Wallet integration via RainbowKit
- Real-time market and portfolio tracking
- Supports Base, Arbitrum, Ethereum, Optimism, BNB Chain
👉 Repo: nusa-fe
Tech Stack
- Language: Solidity (v0.8.20)
- Framework: Foundry
- Cross-chain: LayerZero V2 OApp
- Libraries: OpenZeppelin, Forge Std
Key Features
- Cross-chain borrowing (LayerZero OApp)
- Dynamic interest rate model
- Configurable LTV & liquidation thresholds
- Role-based governance and pausability
- Oracle-based RWA price feeds
- Fully upgradeable via UUPS proxy pattern
Core Contracts
| Contract | Description |
|---|---|
LendingPool.sol |
Core lending and collateral management |
L0/OAppBorrow.sol |
LayerZero cross-chain borrow messaging |
Router.sol |
Cross-chain asset mapping |
TokenDataStream.sol |
Oracle price feed integration |
Supported Networks
- Base (Chain ID: 8453)
- Arbitrum (Chain ID: 42161)
- Local Testnet (Chain ID: 999)
👉 Repo: nusa-sc
Tech Stack
- Framework: Ponder
- Database: PostgreSQL
- Language: TypeScript
- RPCs: Base / Arbitrum RPC endpoints
Responsibilities
- Indexes on-chain events from lending and oracle contracts
- Aggregates protocol data (TVL, rates, health factors)
- Exposes REST & GraphQL endpoints for UI and analytics
Key Entities
| Entity | Description |
|---|---|
markets |
Supply/borrow stats per market |
tokens |
Metadata, thresholds, oracle sources |
positions |
User portfolio, collaterals, debts |
oracle_prices |
Latest RWA & stablecoin prices |
protocol_stats_daily |
Daily TVL, revenue, fees |
cross_chain_messages |
LayerZero OApp message logs |
👉 Repo: nusa-indexer
| Symbol | Currency |
|---|---|
| CADC | Canadian Dollar |
| CNGN | Chinese Yuan |
| KRWT | Korean Won |
| TRYB | Turkish Lira |
| MXNE | Mexican Peso |
| XSGD | Singapore Dollar |
| ZARP | South African Rand |
| IDRX | Indonesian Rupiah |
| EURC | Euro Coin |
| Symbol | Description |
|---|---|
| bCOIN | Bitcoin RWA Token |
| bCSPX | S&P 500 RWA Token |
| bTSLA | Tesla RWA Token |
| bGOOGL | Google RWA Token |
| bNVDA | NVIDIA RWA Token |
| bMSFT | Microsoft RWA Token |
| bGME | GameStop RWA Token |
| bIB01 | iShares Bond RWA Token |
| bIBTA | iShares Treasury RWA Token |
| bHIGH | High Yield RWA Token |
| bZPR1 | ZPR1 RWA Token |
- Node.js 18+
- Foundry
- PostgreSQL 14+
- pnpm / yarn / npm
- Git
# Clone the full org monorepo
git clone https://github.com/nusa-finance/nusa-protocol.git
cd nusa-protocol
# Navigate to any module
cd nusa-fe # Frontend
cd nusa-sc # Smart Contracts
cd nusa-indexer # IndexerFollow each module’s individual README for detailed setup.
- Built with OpenZeppelin audited libraries
- Cross-chain messaging via LayerZero V2 (OApp)
- Health monitoring and liquidation safeguards
- Smart contract audits scheduled prior to mainnet launch
- Wallet connection secured via RainbowKit
- TVL, utilization, borrow rates tracked by indexer
- Health factor monitoring for all positions
- Cross-chain latency via
cross_chain_messagestable - GraphQL API for custom dashboards or data pipelines
This project is licensed under the MIT License — see LICENSE for details.
- 🌐 Live Mini App: Launch on Farcaster
- 💬 Telegram: Nusa Finance Indonesia
- 🐦 Twitter/X: @nusa_finance
- 💻 Discord: Join our community
- 📚 LayerZero Docs: docs.layerzero.network/v2
Built with ❤️ by the Nusa Protocol Team Empowering global DeFi through local stablecoins.
