
FlashBank
io.github.Rotwang9000由 GitHub 账号 Rotwang9000 发布v1.1.1更新于 Oct 24, 2026
Fixed-fee P2P term loans (no oracles) and flash loans on Ethereum, Base, Arbitrum and Sepolia.
概览
让助手浏览、报价,并可选地在以太坊、Base、Arbitrum 和 Sepolia 上参与 FlashBank 的链上 P2P 定期贷款与闪电贷。
- 可以做什么
- 该服务器把 FlashBank 的链上借贷合约暴露给 MCP 客户端。只读工具让助手无需配置即可浏览未成交的 P2P 报价、获取报价、查看闪电贷流动性与费用。配置一次性私钥后,写入工具可以发布、接受或偿还 P2P 贷款,并使用 Sepolia 水龙头;接受报价会在链上锁定已审核的确切条款,在 v2 链上工具会报出按时间归属的费用并报告冷静期返还。
- 适用场景
- 当助手需要查看或操作 FlashBank 的 P2P 贷款市场或闪电贷流动性时使用,例如比较未成交报价、获取条款报价,或在测试网上走完一次贷款生命周期。只读使用无需任何配置;写入使用适合确实希望让代理在链上交易的用户。
- 运行要求
- 通过 npx @flashbank/mcp 以 stdio 在本地运行;未声明身份验证。只读无需配置。写入需要 FLASHBANK_MCP_PRIVATE_KEY(一次性 EVM 私钥),主网写入还需 FLASHBANK_MCP_ALLOW_MAINNET=true;可选按链覆盖 RPC,例如 FLASHBANK_MCP_RPC_SEPOLIA。需要访问相应链的网络。
安装
在 SourceWeft 中
- 打开 控制台中的 FlashBank,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
FlashBank
Non-custodial, on-chain lending where your funds stay in your wallet until the moment they're used. FlashBank is two complementary products that share that principle:
Branding rule: "flashbank" is only ever used as a verb (you flashbank a loan). FlashBank is not a bank, does not hold deposits and takes no custody as a financial institution.
Website: flashbank.net · Source: github.com/Rotwang9000/flashbank-net
Flash Loans (the Router)
FlashBankRouter is a multi-provider flash-loan pool where liquidity providers keep custody:
- No deposits. Providers approve the router and call
setCommitment(token, limit, expiry, paused). WETH stays in their wallet and is only pulled for the microseconds of a flash loan. - Atomic or nothing. The borrower implements
IL2FlashLoanand must repayprincipal + feein the same transaction, or the whole thing reverts. - Configurable, bounded fees. Per-token
feeBps(1–100 bps) with a separate owner cut (ownerFeeBps) and a per-tx max-borrow share of the pool (maxBorrowBps). - Dual-control admin. Sensitive changes (token config, ownership, profit withdrawal) use a propose-then-execute flow split between the
ownerand a separateadmin. See docs/security/DUAL_CONTROL.md.
Provider flow (WETH):
Borrower flow (MEV / arbitrage bots):
Lives in flashloans/. Deploy with cd flashloans && npx hardhat run scripts/deploy-router.js --network <network>
(set ADMIN_ADDRESS / TESTNET_ADMIN_ADDRESS in the repository-root .env). Per-network addresses are read
from NEXT_PUBLIC_* env vars by the website.
P2P Term Loans
FlashBankP2PLoan is a neutral escrow that lets two parties flashbank a fixed-term, collateral-backed loan:
- Time-only settlement. Repay
principal + a flat feebeforematurity + grace, or the lender claims the collateral. Nothing is priced on-chain, so no oracle is needed. - Optional surplus return (no oracle). An offer can set an agreed rate (stored as
settlementValue— how much principal the whole collateral is taken to be worth, frozen at origination); on default the borrower then recovers any collateral beyondprincipal + fee. Leave it0for a pure pledge/forfeit. This honours Lorrow's surplus-return guardrail without an oracle — seedocs/design/LORROW_COMPATIBILITY.md. - Editable offers, front-running-safe. While an offer is open the creator can re-price or amend its non-escrow terms in place (
updateOffer) and top up featured placement (boostOffer) without forfeiting the existing boost. Each edit bumps aversion; a taker can calltakeChecked(id, version)to pin the exact terms they reviewed. - Flat fee, not interest. A single fixed fee rather than time-accruing interest — more compatible with faith-based finance that avoids riba (this is not a Sharia-certification claim).
- Three optional, default-off fees:
- an opt-in interface fee (lender-paid, only on offers posted through flashbank; 0% introductory),
- an optional boost that buys featured marketplace placement ranked by spend (an advert, not interest — non-refundable),
- a per-offer service fee to any address (insurance / third party). Go direct on the contract and it is zero commission.
- Tokens are just ERC-20s. On mainnet/L2 the escrow uses real assets (WETH, USDC, …). On the testnet playground,
fpETH/fpUSDare free faucet tokens with no value.
Lives in loans/. Full design: docs/design/P2P_LENDING_DESIGN.md.
Live on mainnet (Ethereum + Base)
FlashBankP2PLoan is deployed and verified on mainnet — judged solid by the self-audit
and shipped while ETH gas was cheap. Same bytecode on each chain; Ownable, fee recipient = Vultisig vault,
0 bps introductory (a listing fee only ever applies to offers that opt in via listed, hard-capped on-chain at 1%).
No external audit — use real assets at your own risk.
The mainnet UI uses real WETH/USDC. (Arbitrum pending — deployer balance too thin to deploy yet; add later
with MAX_FEE_GWEI pinned low.) Per-chain records in loans/deployments/*-p2p.json.
Mainnet interface is restricted to ETH and USDC for now — custom-token entry is testnet-only — so the front end never invites an unknown/fake token (the contract itself stays permissionless for anyone calling it directly).
v2 — live on the Sepolia playground. FlashBankP2PLoanV2
adds on-chain token sanity-validation, a graduated cooling-off rebate (the flat fee vests from a 10%
floor so a near-instant return is cheap — killing fake-token fee-farming — while consuming a listing is
never free, and a same-block guard stops free flash loans), and pull-payout fallbacks so a
blocklisted recipient can never brick the other party's repayment or default claim. Adversarially
reviewed, unit-tested (22 cases) and deployed to Sepolia (verified, seeded) where it has passed a
live two-agent lifecycle drill; mainnets stay on v1 until it graduates. Full pitfall analysis in
docs/design/P2P_V2_COOLING_OFF.md.
Live on Sepolia (playground — testnet only, no real value)
A self-serve playground is deployed on Sepolia so anyone can try the whole flow end-to-end — it
runs the v2 escrow, so the cooling-off rebate and pull-payouts are live there first. All source
is verified on Etherscan; only key material stays in the untracked .env. Unaudited demo —
never send real assets.
Try it: open /p2p (defaults to Ethereum mainnet), switch to Sepolia, hit the
faucet to mint test tokens, then post or take an offer (a few offers are pre-seeded, including boosted
ones to show ranking and one with a creator-set 2-day cooling window). Redeploy with
cd loans && npx hardhat run scripts/deploy-playground-v2.js --network sepolia
(addresses recorded in loans/deployments/sepolia-playground-v2.json; the retired v1 playground
0x3Ce4…1017 stays on-chain).
For AI agents (MCP)
[npm] [MCP Registry] [Listed on Glama]
The repo ships a self-contained Model Context Protocol server (mcp/, published as
@flashbank/mcp, listed in the official MCP
Registry and on
Glama) so agents can
flashbank too: browse open P2P offers, get quotes, check flash-loan liquidity and fees — and, with
an explicitly configured throwaway key, post/take/repay loans and use the Sepolia faucet. Reads need
no configuration; mainnet writes are double-gated behind FLASHBANK_MCP_PRIVATE_KEY and
FLASHBANK_MCP_ALLOW_MAINNET=true. Takes always pin the exact reviewed terms on-chain, and on v2
chains the tools quote vested fees and report cooling-off rebates. The whole lifecycle is proven by
a live two-agent drill (npm run drill) that walks faucet → create → take → early repay (rebate
verified) → cancel through two real MCP server instances on Sepolia. Details and the tool catalogue:
mcp/README.md.
Repository layout
Each feature is a self-contained Hardhat project. The two never import each other's Solidity, so you can fork this repo, delete the feature you don't want, and the other still compiles, tests and deploys.
Want only one feature? Delete the other top-level directory:
common/ is shared by both and must stay. The website/ is a combined shopfront; if you drop a
feature, also remove its page (website/src/pages/index.tsx for flash loans,
website/src/pages/p2p.tsx for P2P) and its link in website/src/components/Nav.tsx.
A previous deposit-based design,
FlashBankRevolutionary, predates the no-deposit Router. Its contracts and notes live underflashloans/for historical context; the Router and P2P escrow are the current products.
Quick start
Dependencies are installed once at the repository root; each feature resolves Hardhat, the plugins
and OpenZeppelin from there, so there is no per-feature npm install.
Tests
The Solidity suites cover the router (flash-loan flow, owner-fee accrual, dual control, validation) and the P2P escrow (lifecycle, time-based default, the three-tier fee model and boost, reentrancy, plus a randomised fund-conservation fuzz test).
Documentation
Browse docs/ for the full set:
- Architecture — overview, pool mechanics, gas analysis
- P2P design — P2P_LENDING_DESIGN.md, Lorrow compatibility
- Security — the live honest audit page (both features, candid: trust assumptions, what's tested, known limits), plus router audit notes, reentrancy analysis, dual-control runbook
- Deployment — guide, website, live networks
Vulnerability disclosure: SECURITY.md · Contributing: CONTRIBUTING.md · Changes: CHANGELOG.md
Disclaimers
Experimental, unaudited DeFi software. Smart contracts can have bugs; collateral values can move during a loan term; flash-loan profitability depends on market opportunities. Use at your own risk and do your own research.
License
MIT.
来源:README.md,提交 4197a8d
工具
0版本历史
1- v1.1.1最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分