Skip to content

antoncoding/auto-redeem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Auto Redeem

A flexible rescue bot that continuously attempts to withdraw funds from DeFi protocols with limited liquidity.

Supports multiple rescue modes:

  • ERC-4626 Vault Redeem - Works with any ERC-4626 compliant vault
  • Morpho Market Withdraw - Withdraw liquidity from Morpho markets

⚠️ Security Warning

Always create a fresh, one-time wallet to run this bot. Never use your main wallet's private key.

Setup:

  1. Generate a new wallet (bot wallet)
  2. Send ETH to bot wallet for gas fees
  3. For Morpho Markets: Authorize bot at https://www.monarchlend.xyz/tools
  4. For ERC4626 Vaults: Transfer shares to bot OR approve bot (delegate mode)
  5. Set your main wallet as OWNER - rescued assets go here

This way, only the bot wallet is at risk, not your main funds.

Prerequisites

Clone the Repository

git clone https://github.com/antoncoding/auto-redeem.git
cd auto-redeem

Quick Start

1. Install dependencies

pnpm install

2. Run the bot

pnpm start

That's it! The interactive CLI will guide you through everything.

3. Gather Required Information

Before starting, you'll need:

  • Bot wallet private key - Generate a one-time wallet at vanity-eth.tk
  • RPC URL - Get free RPC from Alchemy or Chainstack
  • Vault/Market address - The contract address where your funds are stuck
  • Owner address - Your main wallet where rescued funds should go

📖 See detailed setup guide for step-by-step instructions on getting each of these.

How It Works

The bot uses an interactive CLI that guides you through the entire setup process:

  1. Select a rescue mode - Choose between ERC-4626 Vault Redeem or Morpho Market Withdraw
  2. Enter credentials - Provide your bot wallet's private key and RPC URL
  3. Configure settings - Set vault/market addresses, recipient address, and monitoring interval
  4. Automated monitoring - The bot continuously checks and executes withdrawals when liquidity is available

Available Rescue Modes

Learn more about each mode:

To stop the bot: Press Ctrl+C

Advanced Usage

Direct Script Mode

For power users who want quick restarts with saved configuration:

# Vault Redeem
pnpm start:vault-redeem --vault 0xYourVault --owner 0xYourAddress

# Morpho Market Withdraw
pnpm start:morpho-market-withdraw --market-id YOUR_MARKET_ID --owner 0xYourAddress

Requires a .env file with PRIVATE_KEY and RPC_URL.

See docs/direct-script-mode.md for complete setup instructions.

Legacy Mode

Simple logging output without interactive UI:

pnpm start:legacy

Documentation

About

Auto redeem script

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors