4 CONTRACTS Β· 48 TESTS Β· OPEN SOURCE

Modular DeFi banking
on Polygon.

A four-contract banking suite β€” yield-bearing savings, over-collateralized lending, and an on-chain treasury. No intermediaries. No API keys. No LLM.

// GET STARTED

Test the protocol in 4 steps.

BankChain runs on local Hardhat. 100M BCK are minted at genesis; the Treasury account holds 90M.

Full setup guide β†’
  1. STEP 01

    Start the local node

    From the repo root, run npx hardhat node in one terminal. It prints 20 test accounts β€” copy any private key for later.

  2. STEP 02

    Add Hardhat to MetaMask

    Network name: Hardhat Local, RPC URL: http://127.0.0.1:8545, Chain ID: 31337, symbol: ETH.

  3. STEP 03

    Send yourself test BCK

    Import one of the Hardhat accounts into MetaMask. From the Treasury (0x5FbD…80aa3) BCK is mintable by deployer β€” easiest: use the deployer account, it owns 99M+ BCK.

  4. STEP 04

    Deposit & earn

    Open Vault, approve BCK, then deposit. Yield starts accruing per-second from lending-pool interest.

// PROTOCOL

Four contracts. One banking primitive.

Each contract is a single-responsibility module owned by a Timelock Treasury. Composable, upgrade-safe, fully on-chain.

BankToken

BCK

ERC-20 base

Mintable, burnable, pausable. Permit-enabled for gasless approvals. Owned by Treasury.

SavingsVault

svBCK

ERC-4626 vault

Yield-bearing shares. Deposits earn from lending pool interest minus a 5% performance fee.

LendingPool

Lend

Over-collateralized

Compound-style borrow index, 80% LTV, utilization-based interest, on-chain liquidation.

Treasury

TIMELOCK

Governance

OZ TimelockController with 24h delay. All parameter changes route through it. No multisig shortcuts.

// dependency graph
Treasury ──owns──> BankToken
Treasury ──owns──> SavingsVault
Treasury ──owns──> LendingPool
SavingsVault ──uses──> BankToken (deposit/withdraw asset)
LendingPool ──uses──> BankToken (collateral + borrow)

// HOW IT WORKS

Two products. Three steps.

01

Hold BCK

Get BankChain tokens from the Treasury faucet on testnet, or swap on a DEX on mainnet.

02

Deposit or Borrow

Deposit BCK into the Vault to earn yield, OR post BCK as collateral to borrow against it.

03

Earn & Repay

Vault yield accrues per-second. Loan interest is fixed-rate, utilization-based. Withdraw or repay anytime.

// WHY THIS

Different from Aave, Compound, Uniswap.

Most DeFi protocols optimize for billions in TVL. BankChain optimizes for clarity, testability, and verifiability.

PropertyAave / CompoundBankChain
Contracts20+ across versions4 contracts
Lines of code (core)5,000+~700
Local full-stack testImpossible (mainnet forks)10 min β€” `npx hardhat node`
FrontendMassive codebaseNext.js 14, 6 routes
Backend indexerSubgraph / TheGraphExpress + Prisma + SQLite
GovernanceSnapshot + multi-sigOZ TimelockController (24h)
AI / LLM dependencyNoneNone β€” slash commands only

The trade-off: not built for billions in TVL. Built to be readable, forkable, and 100% testable locally.

// ORIGIN

A reference implementation, not a yield farm.

Existing DeFi protocols are production-grade but intimidating β€” thousands of lines of code, layered upgradeability, dependencies on oracles and off-chain workers. Hard to audit, harder to fork, almost impossible to run locally end-to-end.

BankChain is the opposite. Four contracts, one treasury, ~700 lines of Solidity. Every parameter is timelock-controlled. Every function is event-emitted. The full stack β€” contracts, backend indexer, frontend, slash-command UI β€” runs on a single laptop with npx hardhat node and three terminals.

The point isn't to compete with Aave on TVL. The point is to give developers a readable, forkable, end-to-end-testable DeFi primitive they can extend, audit, or integrate. MIT licensed. No API key required.

// TOKENOMICS

100,000,000 BCK. Fixed supply.

No inflation. No minting after genesis (timelock-controlled). Allocations released via linear vesting.

TOTAL SUPPLY100MBCK
Treasury40%
Ecosystem20%
Public Liquidity15%
Team15%
Vault Bootstrap10%
Treasury40% Β· 40,000,000 BCK

Liquidity backstop, grants, parameter changes (timelock-controlled)

Ecosystem20% Β· 20,000,000 BCK

Partner integrations, audits, bug bounty

Public Liquidity15% Β· 15,000,000 BCK

DEX listings, market making

Team15% Β· 15,000,000 BCK

4-year linear vesting, 1-year cliff

Vault Bootstrap10% Β· 10,000,000 BCK

Initial lending liquidity (deposited at genesis)

// ROADMAP

Where we're going.

βœ“
Q3 2025DONE

Genesis

  • β†’Contracts written (4 files, 700+ LOC)
  • β†’OpenZeppelin 5.x base
  • β†’Hardhat test suite (48 passing)
  • β†’Local deployment verified
●
Q4 2025ACTIVE

Public testnet

  • β†’Public testnet deployment
  • β†’Faucet for BCK
  • β†’Frontend launch on bankchain.vercel.app
  • β†’External audit kickoff
β—‹
Q1 2026UPCOMING

Mainnet + Governance

  • β†’Polygon mainnet launch
  • β†’Snapshot-based governance
  • β†’Bug bounty program (up to $50K)
  • β†’Multi-sig on Treasury
β—‹
Q2 2026UPCOMING

Cross-chain + V2

  • β†’Arbitrum + Base deployments
  • β†’Flash loans (V2)
  • β†’LP-token collateral types
  • β†’Mobile app (React Native)

// SECURITY

Built to be attacked. Hardened to survive.

βœ“

Timelock-controlled parameters

All sensitive changes (fees, LTV, mint authority) pass through a 24h timelock with public queue.

βœ“

Two-step ownership transfer

Every privileged contract uses OpenZeppelin's Ownable2Step β€” no accidental transfer to dead addresses.

βœ“

OpenZeppelin battle-tested

ERC20, ERC4626, TimelockController, ReentrancyGuard, Pausable, Permit β€” all v5.x, all audited by OZ.

βœ“

Compound-style interest model

RAY-precision borrow index, snapshotted on every user action, immune to single-tx inflation attacks.

βœ“

Reentrancy-guarded

All value-moving functions use ReentrancyGuard. No external calls before state writes.

βœ“

Test coverage

48 Hardhat tests covering mint, burn, share math, borrow, repay, interest accrual, liquidation, and edge cases.