Skip to content

sickvisionz/Morpho-Velora-Bundler

Repository files navigation

DeFi Bundler (Beta)

A DeFi Bundler for composing and executing multi-step operations across Morpho Blue (lending, vaults), Velora (swaps via ParaSwap), and Merkl (campaign rewards). Build a sequence of actions (e.g. claim Merkl rewards → supply to Morpho → swap on Velora) and run them in one flow with automatic chain switching and approvals.

Status: Beta – Core flows work; use with caution on large positions.

Features

  • Multi-chain: Ethereum, Base, Arbitrum, Polygon (+ custom chain IDs).
  • Morpho Blue: Supply/withdraw to MetaMorpho vaults; supply/withdraw collateral and borrow/repay in Blue markets.
  • Velora: Swap quotes and transaction building (ParaSwap).
  • Merkl: Claim all claimable campaign rewards on a chosen chain in one action; claimed amounts feed into the bundle so later actions can use them.
  • Bundling: Sequential execution, “Use Previous Output” chaining (except from Merkl), approvals, and balance checks.

Getting started

git clone https://github.com/sickvisionz/Morpho-Velora-Bundler.git
cd Morpho-Velora-Bundler
npm install
npm run dev

Open http://localhost:3000 (or the URL Vite prints). Connect a wallet or enter a watch address, pick chains and markets, add actions to the bundle, then execute.

Scripts

Command Description
npm run dev Start dev server (port 3000)
npm run build Production build
npm run preview Preview production build
npm run lint Type-check (tsc --noEmit)

Project layout (high level)

  • src/App.tsx – Root UI; wraps app in BundlerProvider, renders header, filters, market list, bundle panel, and right sidebar (Velora swap + Merkl claim).
  • src/context/BundlerContext.tsx – Shared bundler state and useBundler().
  • src/components/ – Layout (header), Markets (filters, list, card), Bundle (panel, action bubble, Merkl claim bubble, token selector, balance).
  • src/hooks/ – Markets/positions (React Query), Merkl rewards, bundle state, simulation, execution.
  • src/execution/runBundle and helpers (chain switch, balance, approval, RPC sync; Merkl claim + Velora + Morpho execution).
  • src/services/ – Morpho GraphQL, Velora (typed ParaSwap), Merkl (user rewards API).
  • src/config/ – Wagmi + React Query config.
  • src/constants/ – Chains, Morpho address, ABIs.

See PROJECT_SUMMARY.md for a detailed structure and technical notes.

Disclaimer

This software is provided as-is and is in beta. Use at your own risk.

About

Create bundled Morpho money market and Velora cross-chain DEX aggregator transactions.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages