Cross-Chain Automated Lending Vault powered by Reactive Network
Siaduan is a DeFi protocol that automatically rebalances your funds between lending pools to maximize yield. No manual monitoring required—the protocol detects rate changes and moves your funds to the best opportunities.
Siaduan/
├── Frontend/ # React web interface
│ ├── src/
│ │ ├── components/
│ │ │ ├── WelcomeHero.jsx # Landing page (before wallet connect)
│ │ │ ├── HowItWorks.jsx # Protocol documentation section
│ │ │ ├── VaultCard.jsx # Deposit/Withdraw interface
│ │ │ ├── ProtocolStatus.jsx # Live allocation display
│ │ │ ├── RateControl.jsx # Rate simulation panel
│ │ │ └── FaucetCard.jsx # Test token minting
│ │ ├── contracts/
│ │ │ └── addresses.js # Deployed contract addresses
│ │ └── hooks/
│ │ └── useProtocolData.js # Contract interaction hooks
│ └── public/
│ ├── SiduonIcon.png # Protocol logo
│ └── protocol-architecture.jpg # Architecture diagram
│
├── reactive-lending-protocol/ # Smart contracts (Foundry)
│ ├── src/
│ │ ├── destination/ # Contracts on Sepolia
│ │ │ ├── LendingVault.sol # Main vault - holds user deposits
│ │ │ ├── RateCoordinator.sol # Aggregates pool rates
│ │ │ └── adapters/
│ │ │ └── MockLendingPool.sol
│ │ ├── reactive/ # Contracts on Reactive Network
│ │ │ └── LendingRebalancer.sol # Monitors rates & triggers rebalance
│ │ └── mocks/
│ │ └── MockERC20.sol # Test tokens
│ ├── script/ # Deployment scripts
│ └── README.md # Detailed protocol documentation
│
└── .agent/ # Agent workflows
| Contract | File | Purpose |
|---|---|---|
| LendingVault | LendingVault.sol |
Main entry point. Handles deposits, withdrawals, and receives rebalance callbacks |
| RateCoordinator | RateCoordinator.sol |
Aggregates rates from pools and emits RatesUpdated events |
| Contract | File | Purpose |
|---|---|---|
| LendingRebalancer | LendingRebalancer.sol |
Subscribes to rate events, detects opportunities, triggers cross-chain callbacks |
deposit(uint256 amount) // Deposit USDC, receive shares
withdraw(uint256 shares) // Burn shares, receive USDC
rebalance(...) // Called by Reactive Network to move funds
getAllocations() // View current pool allocationsreportRates(uint256 rateA, uint256 rateB) // Update rates, emit RatesUpdated event
getRates() // Get current ratesreact(LogRecord calldata log) // Called when RatesUpdated detected
subscribeToCoordinator() // Subscribe to rate events| Component | Purpose |
|---|---|
WelcomeHero |
Landing page with protocol overview and Connect Wallet CTA |
HowItWorks |
Interactive documentation with architecture diagrams |
VaultCard |
Deposit/withdraw interface with balance display |
ProtocolStatus |
Shows live allocations between Pool A and Pool B |
RateControl |
Sliders to simulate rate changes (testnet) |
FaucetCard |
Mint test tokens for testing |
- Deposit → Users deposit USDC into LendingVault
- Monitor → RateCoordinator emits
RatesUpdated(rateA, rateB)events - Detect → LendingRebalancer on Reactive Network detects rate differential >2%
- Rebalance → Cross-chain callback moves funds to higher-yield pool
- LendingVault:
0xf8Af4B57A22328Af51448A43eEF1bbdE8542852D - RateCoordinator:
0x8d8159e74eE9c987925a2B5b21Cc6D6970513648 - MockUSDC:
0xf044c58496693C106a7EaE5460d39c1E99ABE074
- LendingRebalancer:
0x8cC046205284913b2844995fB01281E2945DF76f
# Frontend
cd Frontend
npm install
npm run dev
# Smart Contracts (requires Foundry)
cd reactive-lending-protocol
forge buildThe following adapters are implemented and ready for Mainnet deployment. These contracts allow the protocol to interact with major lending pools once the protocol launches on Ethereum Mainnet.
| Contract | File | Purpose |
|---|---|---|
| AaveV3Adapter | AaveV3Adapter.sol |
Adapter for Aave V3 Protocol |
| CompoundV3Adapter | CompoundV3Adapter.sol |
Adapter for Compound V3 (Comet) Protocol |
Note
These contracts are currently NOT deployed. They are intended for the production release of Siaduan Protocol.
MIT
