Complete DeFi ecosystem on Arc blockchain: lending pools, AMMs, and scheduled payouts. Built with Solidity + Foundry, React + Vite. 20/20 tests passing.
This is a testnet MVP (Minimum Viable Product) not production ready.
- π§ͺ Testnet Only: Deployed on Arc Testnet only
- π° Test Funds Only: Use testnet funds exclusively (no real assets)
- π MVP Status: Core features complete but requires security audit before mainnet
- π For Development & Testing: Learning DeFi mechanics, protocol testing, and demos
Do NOT use with mainnet tokens or real funds.
Complete DeFi ecosystem on Arc blockchain: lending pools, AMMs, and scheduled payouts. Built with Solidity + Foundry, React + Vite. 20/20 tests passing.
- Lending Pool: Collateralized borrowing with health factor management
- AMM Pairs: Three constant product pairs (ETH/WBTC, ETH/ARC, WBTC/ARC) with 0.3% fees
- Scheduled Payouts: Time locked fund releases
- Frontend Demo: React UI for protocol interaction
- All contracts verified and audited on Arc Testnet
Frontend Application: https://arclending.vercel.app/
Connect your Arc Testnet wallet and start interacting with the protocol!
Dashboard
Market
History (Transactions)
- π Live Application - Try the lending protocol now
- π Developer Docs - Smart contract details and architecture
- π Security Audit - Contract security review
- π£οΈ Roadmap - Future features and phases
- π Troubleshooting - Common issues and solutions
Requirements: Node.js 16+, Foundry, Git
git clone https://github.com/dharmanan/ARC-Testnet-Lend.git
cd ARC-Testnet-Lend
# Install frontend
cd frontend && npm install && cd ..
# Create local .env file
cp .env.example .env
# Run tests
forge test -v
# Start frontend UI
cd frontend && npm run dev
# Open http://localhost:3000, connect MetaMask to Arc Testnet (Chain ID: 5042002).env and add your PRIVATE_KEY and ARC_TESTNET_RPC_URL. Never commit .env to git it contains secrets.
Create a new testnet wallet using Foundry's cast command:
cast wallet newOutput example:
Successfully created new keypair.
Address: 0xB815A0c4bC23930119324d4359dB65e27A846A2d
Private key: 0xcc1b30a6af68ea9a9917f1ddβ’β’β’β’β’β’β’β’β’β’β’β’β’β’β’β’β’β’β’β’β’β’β’β’β’β’β’β’β’β’β’β’β’β’β’β’β’β’97c5
- Keep your private key secure never share it or commit it to source control
- Add the private key to
.env:
PRIVATE_KEY="0xcc1b30a6af68ea9a9917f1ddβ’β’β’β’β’β’β’β’β’β’β’β’β’β’β’β’β’β’β’β’β’β’β’β’β’β’β’β’β’β’β’β’β’β’β’β’β’β’97c5"Then reload your environment:
source .envGet testnet funds:
- Request faucet tokens from Circle Faucet
- Use only testnet addresses and funds for testing
- Use only testnet addresses and funds for testing
| Contract | Address |
|---|---|
| LendingPool | 0x9dD7314B876fF9dFFB4F9aC4d4c8540156cf10b9 |
| AMM (ETH/WBTC) | 0xF4638B258905C6a2F7Aa71E05aAC887dB697c338 |
| AMM (ETH/ARC) | 0x677df5298Fd0a80672b1E6B4a61BEB75534a83A1 |
| AMM (WBTC/ARC) | 0x27e14cfEF1a029A32F574263dce67371bce32d24 |
Token addresses: CONTRACTS_REPORT.md
ARC-Testnet-Lend/
βββ src/ # Solidity contracts
β βββ LendingPool.sol
β βββ GenericAMMPair.sol
β βββ ScheduledPayoutManager.sol
β βββ ...
βββ test/ # Foundry tests
β βββ Contracts.t.sol
βββ script/ # Deployment & helper scripts
β βββ Deploy.s.sol
β βββ AddLiquidity.s.sol
β βββ ...
βββ frontend/ # React + Vite frontend
β βββ App.tsx, index.tsx, ...
β βββ components/
β βββ assets/
βββ docs/ # Guides, user & dev docs
β βββ LENDING_POOL_GUIDE.md
β βββ dev-notes/
β βββ images/
βββ ROADMAP.md # Project roadmap
βββ DEPLOYMENT_VERIFICATION.md
βββ DOCUMENTATION_INDEX.md
βββ LICENSE # MIT License
βββ README.md # This file
βββ ...
See ROADMAP.md for planned features, phases, and known limitations.
- DOCUMENTATION_INDEX.md β quick links & overview
- LENDING_POOL_GUIDE.md β user guide with UI walkthrough
- SMART_CONTRACT_AUDIT.md β security details
- DEPLOYMENT_VERIFICATION.md β deployment & verification
Build and test the protocol locally:
# Build contracts
forge build
# Run all tests (20 tests)
forge test -v
# Run specific test file
forge test --match-path test/Contracts.t.sol -vRefer to DOCUMENTATION_INDEX.md for more development workflows and debugging steps.
- Smart Contracts: Solidity 0.8.20 + OpenZeppelin Contracts
- Testing: Foundry + Solc 0.8.20
- Frontend: React + TypeScript + Vite
- Styling: Tailwind CSS
- Blockchain: Arc Testnet
- RPC Integration: ethers.js
β οΈ Testnet only do not use with real funds or mainnet tokens- Use only testnet wallet (create new wallet for testing)
- Never commit
.envor private keys use testnet secrets only - Reentrancy guards & access controls (OpenZeppelin)
- See SMART_CONTRACT_AUDIT.md for security details
-
RPC Provider Caching - Wallet balances now display accurate values from blockchain
- Arc official RPC (
https://rpc.testnet.arc.network) is now primary provider - Blockdaemon moved to fallback due to state sync lag
- Impact: Wallet balance displays correct values in real-time
- Arc official RPC (
-
Mock Data Reset - Initial wallet balance state no longer masks blockchain data
- User balances now load correctly from blockchain
- See CHANGELOG.md for details
- MetaMask Red Alert: RPC latency warning (not a security issue). See METAMASK_RED_ALERT_RPC_DELAY.md
- Transaction Delays: Arc Testnet RPC may be slow. Wait 5-10 seconds and refresh.
- Contract Issues: Check SMART_CONTRACT_AUDIT.md for known limitations
Open issues or PRs. For protocol changes, discuss in an issue first.
git checkout -b feature/my-change
forge test
git push origin feature/my-changeMIT β LICENSE
For detailed guides, UI screenshots, and implementation details, see docs/.


