explaingit

neweraoracle/faith-protocol-mvp

0TypeScriptAudience · developerComplexity · 4/5ActiveSetup · moderate

TLDR

DeFi lending MVP on the MegaETH testnet. Deposit tFAITH collateral, borrow tfUSD, then watch a guided demo crash the price and liquidate the vault.

Mindmap

mindmap
  root((faith-protocol))
    Inputs
      tFAITH collateral
      Mock oracle price
      Wallet connect
    Outputs
      tfUSD loans
      Liquidation events
      Live event feed
    Use Cases
      Demo a lending loop
      Simulate a price crash
      Test liquidations on MegaETH
    Tech Stack
      TypeScript
      Solidity
      MegaETH
      Ethers

Things people build with this

USE CASE 1

Walk an investor through a four-step deposit, borrow, crash, liquidate demo

USE CASE 2

Test how vault health updates when a mock oracle price moves

USE CASE 3

Study a minimal collateralised lending contract set on a fast L1

USE CASE 4

Fork the contracts to prototype your own real-time credit market

Tech stack

TypeScriptSolidityMegaETHEthers

Getting it running

Difficulty · moderate Time to first run · 30min

Runs on MegaETH testnet only; you need a wallet with testnet funds and contracts at the addresses listed in the README.

In plain English

FAITH Protocol is a small DeFi lending demo running on the testnet of MegaETH, a blockchain that aims for very low block times so that on-chain prices and balances update almost instantly. The MVP shows a full lending loop end to end: a user deposits a collateral token, borrows a stablecoin against it, watches the collateral price move on an oracle, and gets liquidated if the position becomes unsafe. The README frames this as a proof of concept for what the authors call real-time collateralized credit markets, where vault health changes immediately rather than after slow oracle updates. To make it obvious that nothing is on mainnet, every asset name carries a t prefix. tFAITH is the collateral token, tfUSD is the stablecoin a user can borrow, tMockOracle is the oracle contract that the team can poke with new prices to simulate a market shock, and tVaultManager is the contract that holds the deposits, enforces the borrow limit, tracks debt, and runs liquidations. All four are deployed on the MegaETH testnet at addresses listed in the README. The lending engine has four basic actions: deposit tFAITH, borrow tfUSD, repay tfUSD debt, and withdraw collateral. The risk controls are a 60 percent borrow limit, a health factor that updates as the oracle price moves, oracle based collateral valuation, and a check that flags a vault as unsafe when the health factor crosses a threshold. Liquidation is open in the usual DeFi sense: any other address can step in, repay the debt in tfUSD, and seize the collateral from the unsafe vault. The frontend wraps all of this in a guided four step investor demo. The user clicks through depositing 10 tFAITH, borrowing 5 tfUSD, crashing the tFAITH price to 0.40 dollars through the mock oracle, and finally liquidating the now unsafe vault. The interface tracks progress and shows a 4 of 4 completed state when the full flow has been executed. A live event feed surfaces deposits, borrows, repayments, oracle updates, and liquidations as they happen on chain. The architecture diagram in the README shows the user wallet talking to tVaultManager, which reads prices from tMockOracle, enforces limits, tracks debt, and mints or burns tfUSD as positions open and close.

Copy-paste prompts

Prompt 1
Walk me through how tVaultManager enforces the 60 percent borrow limit and health factor
Prompt 2
Show me how the frontend triggers the mock oracle price crash from the demo UI
Prompt 3
Help me write a script that liquidates an unsafe vault on the MegaETH testnet
Prompt 4
Explain how tfUSD is minted and burned as positions open and close
Open on GitHub → Explain another repo

Generated 2026-05-22 · Model: sonnet-4-6 · Verify against the repo before relying on details.