glend

Execute supply, borrow, repay, and withdraw actions on Glend DeFi protocols.

2|Updated Feb 25, 2026
One-click install
npx skills add https://github.com/terraleiloa/seren-skills --skill glend
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: glend
Source: https://github.com/terraleiloa/seren-skills/tree/main/gemachdao/glend
Command: npx skills add https://github.com/terraleiloa/seren-skills --skill glend

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Glend helps you manage lending and borrowing positions without manually working through chain-specific DeFi mechanics, contract calls, and safety checks. It enables agents to perform reliable DeFi actions across multiple EVM networks using a unified interface.

Core Features & Use Cases

  • Supply / Lend assets on Aave V3 (Pharos) or Compound V2 (Ethereum/Base) to earn interest, including required ERC-20 approvals.
  • Borrow and monitor account health, enforcing safety by checking health factor (Aave) or liquidity/shortfall (Compound) before borrowing.
  • Repay and withdraw assets, including repaying all debt patterns (Aave maxUint256) and redeeming supplied positions (Compound redeemUnderlying).

Use case example: You want an AI agent to open a small test position on Pharos Testnet, borrow within a safe health factor threshold, then repay and withdraw back to your wallet.

Quick Start

Ask the agent to open a Glend position on Pharos Testnet by supplying WETH, borrowing a small amount, then reporting the updated account health using the enabled safety checks.

Frequently Asked Questions about glend

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate DeFi lending and borrowing across Aave V3 and Compound V2?

You can automate DeFi lending and borrowing across Aave V3 and Compound V2 by using an agent-driven workflow that executes supply, borrow, repay, and withdraw actions while enforcing health factor and liquidity guardrails to prevent liquidation risk.

How do I check my Aave V3 health factor before borrowing to avoid liquidation?

To check your Aave V3 health factor before borrowing, you need a workflow that validates pre-trade constraints and simulates contract interactions using viem, ensuring your account maintains a safe health factor threshold before executing the borrow transaction.

Can I use viem to simulate DeFi contract interactions before executing supply or borrow transactions?

Yes, you can use viem to simulate DeFi contract interactions before executing writes, allowing you to validate pre-trade constraints and verify that supply and borrow actions will not trigger liquidation risk or fall short of liquidity requirements.

How do I supply WETH and open a borrowing position on Pharos Testnet?

To supply WETH and open a borrowing position on Pharos Testnet, configure your chain settings using environment variables for the RPC URL and pool address, then instruct your agent to supply the asset, borrow within a safe threshold, and report the updated account health.

What is the safest way to repay all debt and withdraw supplied assets from Compound V2?

The safest way to repay all debt and withdraw supplied assets from Compound V2 involves using agent-driven workflows that check for liquidity shortfall before repaying, then redeeming your supplied positions using the redeemUnderlying function to exit safely.

Why does my DeFi borrowing transaction fail when my account liquidity is too low?

Your DeFi borrowing transaction fails when account liquidity is too low because automated safety checks enforce health factor and liquidity guardrails before borrowing, preventing transactions that would put your position at risk of liquidation.