LendPay

Repay DeFi loans on any chain with USDC in one workflow, powered by KeeperHub

LendPay

Created At

Open Agents

Project Description

LendPay is a cross-chain loan repayment workflow that allows users and agents to repay DeFi loans using USD Coin through a single, streamlined interface. Instead of requiring users to manage multiple wallets and interact directly with protocols, LendPay separates payment from execution. Users simply enter a wallet address, select a repayment action, and pay a small fee in USDC on Base. From there, LendPay handles the rest.

The system detects active positions (starting with DorkFi on Algorand), synchronizes on-chain state, calculates the exact repayment amount (such as accrued interest), and executes the transaction on the destination chain on the user’s behalf. No wallet connection is required on the destination chain, reducing friction and making DeFi interactions significantly more accessible.

Powered by KeeperHub workflows and a pay-to-execute model, LendPay demonstrates a new primitive for DeFi: users pay once, and agents handle the complexity. While the current implementation focuses on repayment, the architecture is designed to expand into broader financial workflows such as rebalancing, liquidation protection, and cross-chain position management.

How it's Made

LendPay is built as a cross-chain execution workflow that separates payment from on-chain action. The frontend is a React-based single-page app that guides users through a step-based flow: enter address → detect positions → choose repayment → pay → execute. The UI is designed to abstract complexity while still exposing an execution trace for transparency.

For payments, we integrate USDC on Base using an x402-style pay-to-execute model. Users connect a Base-compatible wallet via WalletConnect, approve a USDC payment, and trigger the workflow. This payment acts as the authorization and funding mechanism for the agent execution layer.

Execution is handled through KeeperHub workflows, which act as the off-chain coordinator. Once payment is confirmed, a KeeperHub worker fetches the user’s position data from DorkFi on Algorand, performs a sync_market to ensure indices are up to date, calculates the exact accrued interest using scaled accounting, and constructs the repay transaction. The transaction is then submitted on behalf of the user using a controlled execution environment.

One of the more “hacky” but effective parts of the system is the dual-chain abstraction: payment occurs on Base while execution happens on Algorand, without requiring the user to connect a destination-chain wallet. This is achieved by treating the USDC payment as a trigger and using backend-controlled signing/execution logic for the repay call. We also simulate position detection and interest calculations in the UI for responsiveness, then reconcile against real on-chain values during execution.

Overall, LendPay stitches together cross-chain payments, agent workflows, and DeFi protocol interactions into a single, seamless “pay once, execute anywhere” experience.

background image mobile

Join the mailing list

Get the latest news and updates