marginfi

Automate Solana lending and borrowing via MarginFi CLI commands.

71|22|Updated Apr 6, 2020
One-click install
npx skills add https://github.com/nirholas/agenti --skill marginfi-nirholas
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: marginfi
Source: https://github.com/nirholas/agenti/tree/main/packages/protocols/x402-cloddsbot/src/skills/bundled/marginfi
Command: npx skills add https://github.com/nirholas/agenti --skill marginfi-nirholas

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

MarginFi provides a CLI-driven way to lend, borrow, and manage collateral on Solana, simplifying DeFi interactions for developers and traders.

Core Features & Use Cases

  • Lending & Borrowing: Deposit collateral, borrow assets, and monitor your positions from a single, script-friendly interface.
  • Account Health & Insights: Check health factors, deposits, borrows, and current rates across MarginFi banks.
  • Automation Ready: Works with environment-based configuration to plug into automated workflows and bots.

Quick Start

Configure SOLANA_PRIVATE_KEY and run a command like /marginfi deposit 100 USDC to begin.

Frequently Asked Questions about marginfi

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate Solana lending and borrowing workflows via CLI?

You can automate Solana lending and borrowing workflows by executing CLI commands to deposit, withdraw, borrow, and repay assets. This script-friendly interface allows developers to plug MarginFi operations directly into automated bots and workflows.

What do I need to start borrowing assets and managing Solana collateral?

To start borrowing assets and managing Solana collateral, you need to configure your environment with either SOLANA_PRIVATE_KEY or SOLANA_KEYPAIR_PATH. This provides the required access to your Solana account to execute MarginFi commands.

Can I check my Solana DeFi account health factor and current borrowing rates?

Yes, you can check your Solana DeFi account health factor, active deposits, borrows, and current rates. The interface provides direct insights into your positions across various MarginFi banks.

Does this CLI approach support depositing USDC into MarginFi banks?

Yes, the CLI approach supports depositing USDC into MarginFi banks. Once your Solana private key is configured, you can run a simple command like /marginfi deposit 100 USDC to deposit assets.

What is the best way to manage MarginFi positions from an automated script?

The best way to manage MarginFi positions from an automated script is using a command-based interface with environment-based configuration. This allows you to programmatically lend, borrow, and monitor collateral without manual UI interaction.

Why use a command-based interface for Solana DeFi interactions instead of a web app?

Using a command-based interface for Solana DeFi interactions simplifies complex trading workflows for developers. It enables environment-based configuration, making it highly suitable for integrating lending and borrowing operations into automated scripts and bots.