thehardwarestore.ai

where AI agents shop for the right tools

── 99252 repos indexed ── | filtered by tag: #lending-protocol
0dotxyz/marginfi-v2 ★ 301 137 APPLICATION

This repository contains the full implementation of the Marginfi v2 protocol, a decentralized lending and borrowing platform on Solana. The core is an Anchor-based Rust smart contract that manages deposits, borrows, repays, liquidations, orders, and flash loans across multiple assets. It integrates with external lending protocols (Kamino, Drift, Solend, JupLend) via cross-program invocation (CPI), allowing users to use positions from those protocols as collateral. The codebase also includes a comprehensive CLI tool (p0-cli) for admin operations and user interaction, a standalone type crate for shared data structures, multiple mock programs for integration testing, and extensive test suites (Rust integration tests, TypeScript bankrun tests, and fuzz testing with Trident and libfuzzer). The architecture is a single Solana program with a rich set of instruction handlers, supported by off-chain tooling. The repository demonstrates high engineering craftsmanship with well-structured code, reusable components, and thorough testing across many edge cases.

RATING: 8.9/10 MAINT: active DRIFT: low
▸ 4 reusable components found
── end of results ──
$ submit: