This program provides functionality to interact with the Kamino lending protocol on Solana, allowing users to deposit, borrow, and repay assets.
- Deposit tokens into Kamino reserves
- Borrow assets from Kamino reserves
- Repay borrowed assets to Kamino reserves
- Rust 1.70.0 or later
- Solana CLI tools
- Anchor Framework
- Node.js and npm (for running tests)
- Clone the repository:
git clone <repository-url>
cd solana-lending
- Install dependencies:
yarn install
- Build the program:
anchor build
To run the tests:
anchor test
The tests will run on your local Solana validator.
- Configure your Solana cluster in
Anchor.toml
:
[provider]
cluster = "mainnet-beta" # or "devnet" for testing
wallet = "~/.config/solana/id.json"
- Deploy the program:
anchor deploy
The program provides three main instructions:
kamino_deposit_reserve_liquidity
: Deposit tokens into a Kamino reservekamino_borrow_obligation_liquidity
: Borrow assets from a Kamino reservekamino_repay_obligation_liquidity
: Repay borrowed assets to a Kamino reserve
Each instruction requires specific account contexts and parameters. See the program documentation for detailed usage instructions.
- Always verify the program ID before interacting with the program
- Ensure proper account validation and permissions
- Use appropriate error handling and validation
- Follow Solana best practices for account management
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Create a new Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.