listed-book README

The project's README from github.com/kinexbtdev/listed-book. As one markdown file: README.md.

morpho-stock-vault — Morpho Blue USDG Loans Against Robinhood Stock Tokens

Foundry (Solidity) helper for Morpho Blue on Robinhood Chain (chain ID 4663). It computes health factor and liquidation math for borrowing USDG against Robinhood Stock Token collateral (for example NVDA, AAPL, SPY).

What this repo does

Robinhood Earn is built around Morpho and USDG. This repository is the protocol-level view of that stack:

  1. HealthMath.sol implements Morpho Blue’s collateral value, max borrow, health factor, and liquidation incentive factor (LIF) in WAD math.
  2. StockMarketHelper.sol is a read-only wrapper: it inspects a user’s Morpho position (collateral, borrow shares, oracle price) and previews how much collateral a USDG repay would seize.
  3. The helper reverts unless block.chainid == 4663 and the market’s loanToken is USDG. It does not custody tokens or originate a new lending market.

Use it to understand USDG borrowing against tokenized equities, test liquidation numbers, or fork-read live Morpho markets on 4663.

Stock Tokens are not DTCC shares. See Stock Token documentation.

Keywords

Morpho Blue Robinhood Chain, USDG lending, Stock Token collateral, health factor, liquidation incentive, Foundry fork 4663, Robinhood Earn, Paxos USDG.

Contracts

Contract Address Source
Morpho Blue 0x9D53d5E3bd5E8d4Cbfa6DB1ca238AEA02E651010 Morpho addresses
Adaptive Curve IRM 0x2BD3d5965B26B51814AC95127B2b80dD6CcC0fa1 Morpho registry; live irm_address on API markets
USDG 0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168 Token contracts

Do not use Ethereum mainnet Morpho (0xBBBB…FFCb) on 4663. Listed Blue markets here lend USDG, typically at 91.5% LLTV. Curated vaults are Morpho Vault V2 (MetaMorpho V1 lists are empty).

collateralValue = collateral * oraclePrice / 1e36
maxBorrow       = collateralValue * lltv / 1e18
healthFactor    = maxBorrow / borrowAssets          // WAD; < 1e18 is liquidatable
LIF             = min(1.15e18, 1e18 / (1e18 - 0.3e18 * (1e18 - lltv)))
seized          = repaidUSDG * LIF * 1e36 / oraclePrice

Quick start

forge install foundry-rs/forge-std --no-commit
forge test -vv
forge test --fork-url $RH_RPC_URL --fork-chain-id 4663

Local unit tests cover HealthMath. Use a 4663 fork to exercise inspect.

References

Contact

Telegram: kinexbtdev

listed-book (kinexbtdev/listed-book)

Searching Database…

这是做什么的?这是一个面向 Morpho Blue 的 Foundry(Solidity)辅助工具,运行在 Robinhood Chain(链 ID 4663)上,用于以 NVDA、AAPL、SPY 等 Robinhood Stock Token 作为抵押品借入 USDG 时,计算健康度和清算相关的数值。
这是一个我可以存钱的借贷应用,还是一套给我自己项目用的合约?它是两个供你自己在 Foundry 中使用的 Solidity 合约:HealthMath.sol 负责抵押品价值、最大可借金额、健康度和 LIF 计算,而 StockMarketHelper.sol 是一个只读封装,用于查询仓位。它不保管任何资金,也不会创建市场。
我怎么在真实市场上运行它?先运行本地单元测试来验证 HealthMath,然后在 Robinhood Chain(链 4663)的分叉上调用 StockMarketHelper.inspect,读取线上仓位并预览一笔 USDG 还款。
我需要安装 Foundry 才能用它吗?需要。这个仓库是按 Foundry(Solidity)项目搭建的,所以你需要 forge 工具链,而且代码只能在 Robinhood Chain(链 ID 4663)上、以 USDG 作为借贷代币时使用。
如果我把它指向错误的链或错误的市场会怎样?它会直接回退(revert),除非 block.chainid 是 4663 且市场的借贷代币是 USDG。它始终保持只读——不托管资金,也不创建新市场。请注意,Stock Token 并不是 DTCC 股票,而是代币化的包装凭证。
这是给谁用的——Robinhood 用户还是 Solidity 开发者?开发者:它的用途是帮助你理解以代币化股票作抵押借入 USDG、测试清算数值,以及在 4663 上通过分叉读取线上 Morpho 市场,并不是给普通用户用的投资应用。
它围绕哪些代币和合约地址?抵押品是 NVDA、AAPL、SPY 这类 Robinhood Stock Token,借贷资产是 Paxos 的 USDG。README 中列出的 Morpho Blue 地址是 0x9D53d5E3bd5E8d4Cbfa6DB1ca238AEA02E651010,配合 Adaptive Curve IRM,市场通常以 91.5% 的 LLTV 借出 USDG。
在线上仓位上我具体能查看哪些信息?StockMarketHelper 可以读取用户在 Morpho 的仓位——抵押品、借出份额和预言机价格——并预览一笔 USDG 还款会清算多少抵押品。它是只读的,绝不会移动任何资金。
有哪些地址我应该避免指向它?不要在链 4663 上使用以太坊主网的 Morpho 地址(0xBBBB...FFCb)。另外要注意,那上面的精选金库(curated vault)是 Morpho Vault V2,而 MetaMorpho V1 的列表是空的。
Creator
kinexbtdev
Size
<0.1 MB
Stars
151
Updated
CommitSep 15
Age
1mo
Commits · 90 Days