← Works
(02)
Sentinel
Overcollateralized lending protocol with on-chain health-factor enforcement

Stack
SolidityFoundryChainlinkNext.jswagmiviem
Overview
Challenge
Outcome
Next Project
God Bless Farms
wisdom
chukwuma.
(02)
Overcollateralized lending protocol with on-chain health-factor enforcement

Role
Full Stack Engineer
Year
2026
Category
Web3, Smart Contracts
Stack
Overview
A full-stack decentralized lending protocol where users deposit WETH as collateral to borrow USDC, capped by a 75% collateral factor. Position health is tracked on-chain in real time through a health factor derived from collateral value and outstanding debt, with any borrow or withdrawal that would push a position below the safe threshold reverting automatically. Undercollateralized positions are liquidated permissionlessly, with a bounded close factor and liquidation bonus incentivizing prompt liquidation. Collateral is priced through Chainlink oracles with staleness checks, and the system is paired with a Next.js dashboard for wallet connection, position management, and live health-factor visualization.
Challenge
Health factor, collateral valuation, and liquidation seizure amounts all mix 18-decimal, 6-decimal (USDC), and 8-decimal (Chainlink) fixed-point numbers, which made rounding a real attack surface - a naive division could let a liquidator under-seize collateral. That required a custom ceiling-division helper and careful scaling throughout the contract rather than trusting default division. The liquidation mechanism needed the same care: the close factor and liquidation bonus had to be tuned against each other so liquidations stay profitable enough to execute promptly without over-penalizing borrowers, and bounded so a liquidator can never seize more collateral than a position actually holds.
Outcome
Shipped as a complete full-stack system: contract logic hardened with a custom reentrancy guard and checks-effects-interactions ordering on every state-mutating function, oracle staleness checks against stale or zero-price feeds, a Foundry test suite covering the deposit, borrow, repay, and liquidation paths, and a Next.js dashboard with live wallet-connected position tracking and a health-factor gauge that decodes on-chain errors into readable messages.
Next Project
God Bless Farms
→