A decentralized lending platform built on Solana that enables peer-to-peer loans with customizable terms.
The project consists of three main components: # LoanMe
LoanMe is a decentralized lending platform built on Solana, enabling users to create, manage, and repay loans in a trustless environment. The platform leverages Anchor for Solana smart contracts, Flask for backend APIs, and SQLite for lightweight data storage.
- Loan Management: Borrowers can request loans, and lenders can fund them.
- Solana Smart Contracts: Powered by Anchor to ensure security and transparency.
- Wallet Integration: Users can generate and manage Solana wallets.
- Payment Processing: Borrowers can make repayments via smart contracts.
- API-Driven: Exposes RESTful APIs for frontend integration.
git clone https://github.com/robertwbattle/LoanMe.git
cd LoanMepip install -r requirements.txtEnsure you have Anchor & Solana CLI installed:
sh -c "$(curl -sSfL https://release.solana.com/stable/install)"
npm install -g @coral-xyz/anchor-cliVerify installation:
solana --version
anchor --versionCreate a .env file inside the backend/ directory and configure:
SOLANA_RPC_URL="https://api.devnet.solana.com"
WALLET_PRIVATE_KEY="[YOUR_SOLANA_PRIVATE_KEY]"
PROGRAM_ID="[YOUR_DEPLOYED_PROGRAM_ID]"
TATUM_API_KEY="[YOUR_TATUM_API_KEY]"
TATUM_API_URL="[TATUM_API_ENDPOINT]"cd backend
python setup_db.py # Initializes the databasecd backend
python app.pyThe API will be available at http://127.0.0.1:5000
cd anchor
anchor build
anchor deploy- POST
/api/account- Create a new user account - POST
/api/generate-wallet/<user_id>- Generate a Solana wallet for a user
- GET
/api/loans/<loan_pda>- Get loan details - POST
/api/loans- Create a new loan - POST
/api/loans/<loan_pda>/payments- Make a payment on a loan
- POST
/api/deploy- Deploy smart contract - GET
/api/deploy/<signature>- Get deployment status
solana logssolana transaction <SIGNATURE> --verboseanchor test- Frontend React Integration
- WalletConnect Support
- Multi-currency Loan Support
- Enhanced Smart Contract Security
LoanMe uses Solana’s security best practices, but as an open-source project, we encourage audits and contributions to improve the platform.
Contributions are welcome! Please create an issue or submit a pull request.
This project is licensed under the MIT License.