Skip to content

drTagabat/loafbank

Repository files navigation

LoafBank Lending

Solana/Anchor lending protocol with:

  • deposits and withdrawals (USDC, SOL, LOAFCAT);
  • collateral lock/unlock and borrowing/repayment flow;
  • liquidation and health checks;
  • staking module for LOAFCAT rewards;
  • governance module (proposals and voting);
  • admin controls for emergency mode, APY updates, and fee withdrawals.

Project Structure

  • programs/loafbank_lending - main on-chain Rust program.
  • tests - TypeScript integration checks and safety assertions.
  • scripts - deployment/migration helper scripts.
  • docs - protocol and implementation documentation.

Audit-Relevant Notes

  • Program entrypoint surface is limited to active instructions in programs/loafbank_lending/src/lib.rs.
  • Critical disabled admin entrypoints were removed from the public instruction surface.
  • Emergency admin authorization path uses Unauthorized error code.
  • Integration checks for these hardening rules are in tests/audit-hardening.integration.ts.

Local Validation

cargo check -q
cargo test -q
npm test
anchor build

anchor build is required to regenerate the IDL before external audit or deployment.

Program ID

  • 53ipEAGTwFqznutD4MKmwhkszMZK6nFBSoTQeXw2iuJz (configured in Anchor.toml)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors