Lasagna Finance CLI Demo

Welcome to Lasagna Finance CLI documentation! This guide will help you understand and use the Lasagna Finance CLI for testing Liquid Staking Token (LST) arbitrage opportunities on Solana.

Table of Contents

  1. Installation

  2. Quick Start

  3. Core Features

  4. Command Reference

  5. Development Guide

  6. Troubleshooting

  7. API Reference

1. Installation

Prerequisites

  • Node.js v16 or higher

  • npm v7 or higher

  • Solana CLI tools (optional, for local validator testing)

Install via npm

npm install -g @lasagna-finance/cli

Verify Installation

2. Quick Start

Initial Setup

Basic Usage Example

3. Core Features

Wallet Management

  • Create new wallets

  • Import existing wallets

  • Check balances

  • Request airdrops (devnet only)

LST Operations

  • Deposit stSOL and mSOL

  • Track staking rewards

  • Auto-compound rewards

  • Optimize APY across pools

Portfolio Management

  • Real-time balance tracking

  • APY monitoring

  • Reward calculations

  • Performance analytics

Arbitrage Features

  • Real-time price monitoring

  • Automated opportunity detection

  • APY comparison across protocols

  • Transaction simulation

4. Command Reference

Global Options

  • --help: Display help information

  • --version: Show CLI version

  • --network: Specify network (mainnet, devnet, localnet)

Wallet Commands

Staking Commands

Portfolio Commands

Monitor Commands

5. Development Guide

Local Setup

Testing with Local Validator

Environment Configuration

Create a .env file:

6. Troubleshooting

Common Issues

Connection Issues

Transaction Errors

Wallet Issues

Debug Mode

7. API Reference

Program Accounts

Vault Account

User State

Transaction APIs

Deposit Function

Withdraw Function

Contributing

Development Process

  1. Fork the repository

  2. Create feature branch

  3. Submit pull request

  4. Pass CI/CD checks

Code Style

  • Follow TypeScript best practices

  • Use Prettier for formatting

  • Write unit tests for new features

Last updated