Method
How every number is made
Everything on Credio Finance is either read from Robinhood Chain (chain 4663) at the time shown, computed from those reads with the formulas below, or typed by you in the Sample market and labelled Sample data.
01
What is read
Morpho Blue 0x9d53d5e3bd5e8d4cbfa6db1ca238aea02e651010: idToMarketParams (loan and collateral token, oracle, rate model, LLTV) and market (supply, borrow, last update) for 14 markets with real USDG borrowing, then the oracle's price(), the rate model's borrowRateView, both tokens' symbol, name and decimals. All in one Multicall3 read, refreshed every 30 seconds for the whole site.
USDG is recognised by its address 0x5fc5360d0400a0fd4f2af552add042d716f1d168, never by its symbol. A collateral token that calls itself a Robinhood stock token counts as one only when its code hash is the stock proxy's, its beacon slot holds Robinhood's beacon and it has supply. ETH / USD on the home page is Chainlink's feed 0x78f3556b67e17df817d51ef5a990cdaf09e8d3a9.
02
Oracle checks
A Morpho market is liquidated on its oracle's price, so the oracle is checked before a market is shown as checked:
- Factory:
isMorphoChainlinkOracleV2(oracle)on Morpho's factory 0xb7c16f6f8cf531447bf27ca7220f981e79c9cdf2. Anything else is a custom oracle: Credio shows its price but cannot tell how it is made. - Feeds: each feed must be a proxy from Chainlink's published directory for Robinhood Chain, or point to the same aggregator as one (both read on chain).
- Scale:
SCALE_FACTOR = 10^(36 + loan decimals + quote feed decimals − collateral decimals − base feed decimals). A wrong scale would move the price by powers of ten. - No vault rate in the price (an ERC-4626 conversion Credio does not check), and every feed updated within its heartbeat.
- Loan token is USDG at its address; the rate model is Morpho's adaptive curve model 0x2bd3d5965b26b51814ac95127b2b80dd6ccc0fa1.
A failed read is shown as "incomplete", never as checked. A passed check says how the price is wired; it never says a loan is safe.
03
The stress math
collateral value = collateral × oracle price max borrow = collateral value × LLTV (liquidation starts above this) health factor = max borrow ÷ debt (below 1.00 = can be liquidated) drop to liq. = 1 − debt ÷ max borrow liquidation price = debt ÷ (collateral × LLTV) LTV = debt ÷ collateral value incentive factor = min(1.15, 1 ÷ (1 − 0.3 × (1 − LLTV))) (Morpho Blue) repay to reach r = debt − collateral value × LLTV × (1 − r) top-up to reach r = debt ÷ (price × LLTV × (1 − r)) − collateral
The integer version rounds exactly as Morpho Blue does (collateral × price ÷ 1e36 down, × LLTV down) and is the same code path as CredioStressLens: 74 cases from real markets and edge values, answered by the contract on a Robinhood Chain fork, are replayed in the site's tests and all match.
04
What a liquidation takes
Morpho Blue lets anyone liquidate a position whose debt is above the line, in full. The liquidator repays debt and takes collateral worth the repaid debt × the incentive factor. The stress table assumes a full liquidation: incentive paid = seized − repaid; left to you = collateral value − seized; if the collateral is worth less than debt × incentive, all of it can be taken and the rest of the debt is bad debt for lenders.
05
Interest
Your positions are read as borrow shares and turned into debt the way Morpho Blue does: total borrow grows by rate × t + (rate × t)²/2 + (rate × t)³/6 since the market's last update, then shares × (total + 1) ÷ (shares total + 1e6), rounded up. The simulator's interest slider uses the market's current borrow rate, which changes with use.
06
CredioStressLens
One contract, not deployed yet (the owner deploys it). View functions: compute (pure math), stress (a hypothetical position at the live oracle price), stressLadder (up to 32 price drops), withChange (repay / top-up), positionStress (a wallet's real position with interest accrued), marketInfo (an oracle or rate failure is a flag, not a revert).
The scenario log: saveScenario stores the market, your amounts and the figures the contract itself computes at the live oracle price (so a saved scenario is not your claim), with an optional hash of a private note; retireScenario marks one of yours retired; recheck recomputes a saved scenario at today's price.
No owner, no admin, no fee, no upgrade; it accepts no ether and can move no tokens. Saving costs about 245,000 gas, paid in ETH. Its tests: unit, hostile oracles (reverting, zero, gas-burning), fuzzing against Morpho's health rule, invariants on the log, and fork tests against live markets.
07
Limits
- It cannot predict prices or how fast they move. A 30 % gap can happen between two oracle updates, or over a weekend for stock tokens.
- The oracle price is not the price you could sell at. Liquidity can be thin exactly when prices fall.
- The stress table holds the loan token at its value and the debt fixed during the drop.
- Only the 14 listed markets are read; positions elsewhere are not scanned.
- Stock-token issuers can pause or block transfers, which can stall a repayment, a withdrawal or a liquidation.
- Nothing here is advice to borrow. The word "safe" is never used for a loan.
08
Sample market
The Sample market starts at a price of 100, an LLTV of 75 % and a 5 % rate, and lets you type your own. Every number it produces carries the Sample data label. Nothing about it is read from a chain.