hackquest logo
  • 学习
  • 课程探索
  • 实战
  • 探索黑客松
  • 往期项目
  • 社区
  • 论坛
  • 全球活动
  • 我的社区
  • 共学营
  • 组织中心
  • 更多
    • 词汇表
    • 博客
    • 水龙头
    • 工作机会
    • 媒体工具包
    • 创始人
hackquest logo

Blue Finance

Lending Protocol for Tokenized Stocks on BNB Chain

视频

项目图片 1
项目图片 2
项目图片 3
项目图片 4

技术栈

Solidity
Next
React
Web3
Node

描述

Blue Finance is a lending protocol on BNB Chain that lets users borrow USDT against tokenized US stocks (Binance bStocks) without selling them, with borrowing rules that know when the stock market is open.

It is deployed on BNB Mainnet with mock bStocks tokens to test with.

The problem: Tokenized stocks trade 24/7, but the stocks behind them don't. The regular US session covers only 32.5 of the 168 hours in a week. Weekend price gaps, trading halts, stock splits and issuer restrictions can make a loan that looks safe suddenly risky, or make a healthy position look underwater.

Our solution: An Aave V3.6 pool with one shared USDT reserve and separate rules for each stock:

  • Market-aware borrowing: An onchain market calendar lowers borrow limits and debt caps in extended hours, overnight and on weekends. The liquidation threshold stays the same, so a session change alone doesn't reduce a position's health factor.

  • Isolated circuit breakers: A halt or corporate action blocks new borrowing against the affected stock only. Repayment stays open.

  • Two-tier pricing: New loans need fresher, keeper-accepted prices, while liquidations react to real price gaps immediately.

  • One-click leverage: Borrow, swap and re-supply in a single batched transaction.

  • Risk intelligence: A prototype risk controller, running on simulated data, proposes parameter changes for human review.

本次黑客松进展

We went from an open question to a lending pool deployed on BNB Smart Chain mainnet, changing the architecture several times along the way.

Idea. We started with liquidity primitives (a pegged-RWA Bin pool hook and an EVM prop AMM, explored before the event) and compared six candidates. We chose lending against tokenized stocks, because the tokens trade 24/7 and the underlying market doesn't.

Iteration 1: Morpho Blue. We built a market-hours oracle, an onchain calendar, a borrow router, keepers, a liquidation bot and fork tests with real TSLAB (102 tests passing on Nov 26).

What didn't work:

  • Off-hours haircuts sat inside the oracle price, so a position near the limit could become liquidatable at the Friday close with no price move.

  • Borrow rules lived in a router, which users could bypass by calling Morpho directly.

  • Real Atlas feeds behaved differently from our assumptions: latestTimestamp() reverted, and our 1-hour staleness limit was too tight. We rewrote the price read and widened the limit.

Iteration 2: Aave V4. We designed a hub-and-spoke version, but V4's license requires a waiver for production use, including a public demo with real USDT.

Iteration 3: Aave V3.6 (current). One shared USDT reserve, with rules enforced inside the pool. Following Zona Lend, we separated permission to borrow from valuation of existing positions. Market hours now change borrow limits only, real price gaps reach liquidators immediately, and a monitoring outage blocks new borrowing without blocking withdrawals within limits.

What we shipped

  • BluePool and five bStock markets on BNB mainnet (all 59 deployment transactions succeeded)

  • 58 Foundry tests passing, including BNB mainnet fork tests

  • A web app with earn, borrow, dashboard, risk and a guided Simplified Mode, plus a no-wallet simulator

  • A demo pool with test tokens, and one-click leveraged borrowing that sends real transactions

  • A keeper and eligibility service that tracks market status and halts

  • An advisory AI risk controller and a joint stress analysis for lenders

Setbacks

  • We rolled back a frontend redesign to the original guided app.

  • We narrowed onchain-oriented risk policy work to a standalone research demo.

  • Our first guardian wallet was compromised on launch day. We moved the keeper and guardian roles to a new wallet in one atomic batch.

融资状态

NIL

队长
NNeelansh Mathur
项目链接
部署生态
BNB Smart ChainBNB Smart Chain
赛道
DeFiRWA