CredditLink is a portfolio aware credit layer that allows users to deposit one or more eligible Robinhood Stock Tokens as collateral and access a unified USDG credit line.




# Creddit Link
**Creddit Link** is a decentralized lending protocol designed to provide programmable asset-backed credit. It allows users to deposit tokenized assets (specifically Real World Assets like tokenized stocks) as collateral to draw a unified, risk-adjusted stablecoin (USDG) credit line — enabling users to unlock liquidity without selling their underlying equity positions.
## Overview
Unlike traditional isolated lending markets, Creddit Link consolidates a user's portfolio into a single, unified financial position. Users can pool different eligible RWAs and draw a revolving credit line against the combined, risk-adjusted value of their assets.
Under the hood, the protocol separates collateral management from liquidity provisioning. Borrow requests are automatically routed across multiple liquidity pools via smart aggregation, picking the cheapest borrow rates available.
### Key Features
- **Unified Credit Line**: Deposit multiple registered Stock Tokens into a single position and draw a single USDG credit line against the combined portfolio value.
- **Smart Lending Router & Capital Aggregation**: The protocol features a lending router that acts as an aggregator over `ILendingAdapter` pools. It quotes available liquidity across all pools and routes borrow requests to the cheapest sources first.
- **ERC-4626 Yield Liquidity Pools**: Liquidity providers (LPs) deposit USDG into yield-bearing `CredditLiquidityPool` vaults (minting `cUSDG` tokens). The liquidity pools mint/disburse USDG to borrowers, collect origination fees for the Treasury, and accrue interest dynamically based on pool utilization.
- **Dynamic Risk Engine**: Credit limits and liquidation thresholds are calculated dynamically based on real-time oracle prices, collateral volatility, and maximum exposure parameters per asset.
- **Revolving Debt Accounting**: A global debt index tracks interest continuously, issuing "debt shares" to borrowers for gas-efficient accounting across the entire protocol.
- **Automated Liquidations**: Anyone can liquidate undercollateralized positions. The system uses dynamic close factors and collateral seizures that reward liquidators while collecting protocol fees for the treasury.
- **Concentration Risk Management**: The protocol enforces maximum exposure caps per asset to ensure the system remains insulated from the idiosyncratic risks of any single stock or asset class.
## What We Built During the Hackathon
Over the course of the hackathon, we built out an extensive, production-ready smart contract architecture and integrated it into a modern frontend stack to ensure the protocol is both robust and easy to interact with.
### 1. Comprehensive Smart Contract Architecture (Solidity)
We engineered a full suite of core smart contracts to handle multi-asset credit, dynamic risk, capital aggregation, and protocol safety:
- **`CredditCreditLine`**: The flagship contract of the protocol. It acts as the central hub managing user positions, allowing multi-asset collateral deposits, borrowing, repayments, and liquidations using a scalable WAD-math based global debt index.
- **`CredditLiquidityPool`**: The ERC-4626 yield-bearing vault that holds USDG liquidity deposited by Liquidity Providers (issuing `cUSDG` LP tokens). It implements `ILendingAdapter` and directly handles USDG disbursements to borrowers, collects origination fees for the Treasury, and accrues borrow interest over time.
- **`CredditLendingRouter`**: A cross-protocol capital aggregator that manages registered liquidity adapters (`ILendingAdapter`). When a user borrows, the router queries available liquidity across all enabled pools, sorts them to find the lowest effective interest rates and fees, and routes borrow/repay requests accordingly.
- **`CredditRiskEngine`**: A dynamic risk processor that calculates real-time credit limits, health factors, and liquidatability by evaluating portfolio concentration, dynamic close factors, and collateral-specific risk weights.
- **`CredditAssetRegistry`**: A configuration registry that whitelists eligible RWA collateral assets, defining strict parameters like Loan-to-Value (LTV) ratios, liquidation penalties, and maximum exposure caps to protect against asset concentration.
- **`CredditInterestRateModel`**: A mathematical model determining dynamic borrow interest rates based on pool utilization rates.
- **`CredditOracle`**: The pricing aggregator designed to interface with decentralized price feeds, ensuring tokenized equities and USDG are priced accurately in real-time.
- **`CredditTreasury`**: A secure vault for collecting and managing protocol fees generated from origination fees and liquidation events.
- **`CredditLens`**: A specialized read-only helper contract that aggregates complex on-chain state into single, efficient RPC calls, drastically simplifying data fetching for the frontend.
### 2. Frontend Integration for Seamless Interaction
To make this complex financial architecture highly accessible, we built a modern frontend ecosystem utilizing a Turborepo monorepo:
- **CredditLink**: A fully responsive, user-friendly interface built with Next.js, allowing users to effortlessly open credit lines, manage their collateral portfolio, and borrow/repay USDG with just a few clicks.
- **Wallet Connection & Web3 Integration**: Integrated standard Web3 tooling (like wagmi and viem) to connect user wallets securely, bridging the gap between the on-chain smart contracts and the frontend UI.
- **Data Aggregation via Lens**: Leveraged the `CredditLens` contract in the frontend to instantly display a user's health factor, available credit, and total debt without making dozens of individual RPC calls, ensuring a snappy, lag-free experience.
## Deployment
- **Testnet Deployment**: Deployed the core protocol to a public testnet on RobinHood Chain for community beta testing.
## Next Steps Post-Hackathon
- **Security Audits**: Conduct comprehensive testing and independent security reviews of the risk engine and WAD math accounting.
- **RWA Partnerships**: Finalize integration paths with tokenized stock issuers to officially whitelist the first batch of collateral assets.
We are currently in seed round.