| Crates.io | yeildin-cli |
| lib.rs | yeildin-cli |
| version | 0.1.0 |
| created_at | 2025-12-06 21:08:44.802845+00 |
| updated_at | 2025-12-06 21:08:44.802845+00 |
| description | CLI client for interacting with Yeildin Protocol - a unified liquidity pool on Solana with magic swap and liquidity functions |
| homepage | https://github.com/atlantictechguy/yeildin |
| repository | https://github.com/atlantictechguy/yeildin |
| max_upload_size | |
| id | 1970753 |
| size | 371,159 |
Command-line interface for interacting with the Yeildin Protocol - a unified liquidity pool on Solana.
cd cli
cargo build --release
The binary will be at target/release/yeildin.
You can add it to your PATH:
sudo cp target/release/yeildin /usr/local/bin/
yeildin init --rpc-url https://api.mainnet-beta.solana.com --wallet ~/.config/solana/id.json
This creates a config file at ~/.config/yeildin/config.toml with your settings.
yeildin info
View detailed pool statistics:
yeildin info --detailed
Deposit tokens into the pool and receive LP tokens:
yeildin deposit --token <TOKEN_MINT> --amount 100 --min-lp 99
Burn LP tokens and receive underlying tokens:
yeildin withdraw --amount 100 --token <TOKEN_MINT> --min-out 99
Exchange one token for another through the pool:
yeildin swap --from <FROM_MINT> --to <TO_MINT> --amount 100 --min-out 98
Intelligent swap routing with Jupiter integration:
# With Jupiter aggregator (best route finding)
yeildin magic-swap --from <FROM_MINT> --to <TO_MINT> --amount 100 --slippage 1.0
# Direct pool routing
yeildin magic-swap --from <FROM_MINT> --to <TO_MINT> --amount 100 --use-jupiter false
Features:
Simplified deposit with preview and confirmation:
yeildin magic-add --token <TOKEN_MINT> --amount 100 --slippage 0.5
# Auto-approve (no confirmation)
yeildin magic-add --token <TOKEN_MINT> --amount 100 -y
Features:
Optimized withdrawal with best execution:
# Withdraw to specific token
yeildin magic-remove --amount 100 --token <TOKEN_MINT> --slippage 0.5
# Proportional withdrawal (default)
yeildin magic-remove --amount 100 -y
Features:
Default: ~/.config/yeildin/config.toml
Override with --config flag:
yeildin --config /path/to/config.toml info
rpc_url = "https://api.mainnet-beta.solana.com"
wallet_path = "/home/user/.config/solana/id.json"
program_id = "8DVcjWUSBobmb4b3wdEksb9jwoxfUC55nzkky3u8s4qW"
pool_state = "CbqmbCN5HEc4pBWTgUkU5xw3ePPGyXzCY7JvBsnHJFpL"
Override config values with CLI flags:
yeildin --rpc-url https://api.devnet.solana.com --wallet /path/to/wallet.json info
yeildin --rpc-url https://your-private-rpc.com swap --from <FROM> --to <TO> --amount 100
yeildin --wallet /path/to/other-wallet.json deposit --token <MINT> --amount 50
Enable debug logs for troubleshooting:
yeildin --verbose magic-swap --from <FROM> --to <TO> --amount 100
Check your balance and pool info:
yeildin info --detailed
Deposit USDC into the pool:
yeildin magic-add --token EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v --amount 1000 --slippage 0.5
Swap SOL for USDT via best route:
yeildin magic-swap \
--from So11111111111111111111111111111111111111112 \
--to Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB \
--amount 10 \
--slippage 1.0
Remove liquidity:
yeildin magic-remove --amount 500 --token EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
8DVcjWUSBobmb4b3wdEksb9jwoxfUC55nzkky3u8s4qWCbqmbCN5HEc4pBWTgUkU5xw3ePPGyXzCY7JvBsnHJFpLDSRoJ2n128oY7L5amNM1bDak3eP1Q1YHJUVbJoNR93Zq
Magic swap uses Jupiter's V6 API for intelligent routing:
https://quote-api.jup.ag/v6/quotehttps://quote-api.jup.ag/v6/swapDefault RPC: https://api.mainnet-beta.solana.com
For production usage, consider using a private RPC provider for better reliability:
git clone https://github.com/atlantictechguy/yeildin.git
cd yeildin/cli
cargo build --release
cargo test
cli/
├── src/
│ ├── main.rs # CLI entry point and command routing
│ ├── config.rs # Configuration management
│ ├── client/ # Anchor client wrapper
│ │ └── mod.rs
│ ├── commands/ # Command implementations
│ │ ├── deposit.rs
│ │ ├── withdraw.rs
│ │ ├── swap.rs
│ │ ├── info.rs
│ │ └── magic/ # Magic functions
│ │ ├── swap.rs
│ │ ├── add_liquidity.rs
│ │ └── remove_liquidity.rs
│ └── jupiter/ # Jupiter integration
│ ├── mod.rs
│ └── client.rs
└── Cargo.toml
Ensure your wallet file exists and is readable:
ls -la ~/.config/solana/id.json
Check your RPC connection:
yeildin --rpc-url https://api.mainnet-beta.solana.com info
Ensure you have:
If magic swap fails with Jupiter, try direct pool routing:
yeildin magic-swap --from <FROM> --to <TO> --amount 100 --use-jupiter false
⚠️ Important Security Notes:
Apache-2.0
../docs/ for technical specificationsContributions welcome! Please:
See main project README for contribution guidelines.