-
Notifications
You must be signed in to change notification settings - Fork 58
Description
π·οΈ Agent Name
Radiant Strategy Pack
π Agent Description
The Radiant Strategy Pack is a community-contributed collection of 3 DeFi agent templates designed for the Vibekit ecosystem. These agents automate multiple Radiant lending strategies on Arbitrum and leverage the Radiant Lending Plugin requested in Issue #310.
This agent pack provides automated looping, health factor protection, and auto-compounding of RDNT rewards. It exposes a clean strategy interface and allows end-users to run each strategy through a CLI without writing code.
Included strategies:
-
Radiant Leveraged Looping Lender
- Automates supply/borrow loops
- HF-aware and borrow-cap aware
- Safe stopping and guardrails
-
Radiant Health Factor Shield
- Monitors HF
- Performs soft deleverage
- Triggers hard emergency exit when needed
-
Radiant Rewards Auto-Compounder
- Claims RDNT
- Swaps to target asset
- Supplies back into Radiant
Key features:
- Built on top of the Radiant Lending Plugin
- Abstraction layer (
RadiantClient) for clean interactions - CLI runner for non-developers
- Full unit tests with mocks
- Safe execution guardrails
- Located in:
typescript/community/agents/radiant-strategy-pack/
Implements and extends:
#310
π Required Protocols
Primary protocols:
- Radiant V2 Lending Protocol on Arbitrum One
- Radiant Lending Onchain-Actions Plugin (markets, positions, actions)
Optional protocols:
- None. All data is fetched on-chain via viem and Radiant contracts without external API dependencies.
π€ Automation Level
Manual - User triggers each action
ποΈ Code Architecture
Skills & Tools structure:
- Primary skills:
- Fetch Radiant market data (APR, liquidity, prices)
- Query user lending positions (collateral, debt, health factor)
- Build lending transactions (supply, withdraw, borrow, repay, setCollateral)
- Internal tools:
RadiantClientabstraction used by the strategies- Radiant onchain-actions plugin:
markets,positions,actions - CLI wrapper for running strategies without writing code
- MCP tools:
- Not used in this agent. All tools are internal TypeScript modules.
Agent components:
- Context providers:
- Wallet / signer configuration for sending transactions (outside this package β tx builders only return calldata)
- RPC provider via viem for on-chain reads
- Hooks:
- Logging hooks inside the strategies (loop iterations, HF checks, compound decisions)
- Validation hooks for HF thresholds, borrow capacity, min compound threshold, and max loop limits
- Configuration & environment:
- Per-strategy config (asset, HF thresholds, loop count, minRewards, etc.)
- Radiant network config via
radiant.config.ts(addresses, decimals, chainId) - viem client configuration for RPC URL
Integration patterns:
- All protocol interactions go through the Radiant onchain-actions plugin:
markets.tsfor market datapositions.tsfor user positions (HF, collateral, debt)actions.tsfor building supply/withdraw/borrow/repay/setCollateral txs
- Strategies never call contracts directly; they call
RadiantClient, which wraps the plugin. - Transaction builders return
{ to, data, value }only; the caller is responsible for signing & broadcasting transactions. - Error handling and safety:
- Looping strategy stops on low HF or when max loop count is reached.
- Health Factor Shield strategy has soft, hard, and full-exit modes based on HF bands.
- Auto-compounder skips if rewards are below a minimum threshold and uses a simplified 1:1 mock swap model for RDNT β target asset in the current version.
π§ͺ Testing Requirements
Unit tests:
- Radiant plugin:
markets.test.tsvalidates market data fetching.positions.test.tsvalidates user position and health factor queries.actions.test.tsvalidates tx builders for supply/withdraw/borrow/repay/setCollateral.
- Strategy pack:
radiantLooping.test.tscovers looping lender behaviour (HF stop, maxLoops, borrow/supply ordering).healthShield.test.tscovers HF shield soft/hard deleverage and emergency exit.compounder.test.tscovers reward threshold and compound path.cli.test.tscovers CLI argument parsing and correct strategy dispatch, all using a mockedRadiantClient.
Integration tests:
- Local integration using mocked or forked RPC can be used to validate that:
- Radiant plugin reads markets and positions correctly on Arbitrum.
- Strategy pack composes plugin calls in the expected order.
- These are optional for merge but supported by the architecture.
Live testing:
- Designed to be run against Arbitrum mainnet or a mainnet fork:
- User provides RPC URL and wallet with collateral.
- CLI can be pointed to live Radiant markets.
- Live testing is not required for inclusion as a community agent template, due to collateral and risk constraints, but the flows are compatible with live deployment.
π Additional Information
Repository folder:
typescript/community/agents/radiant-strategy-pack/
This submission includes:
- Complete strategy pack
- Full strategy documentation
- CLI runner for easy user execution
- Unit test suite with mocks
- RadiantClient abstraction layer
- High-safety guardrails for DeFi automation
Implements the requirements from:
Issue #310 β Integrate Radiant Lending Protocol (Arbitrum)
β Pre-submission Checklist
- I have searched existing issues and templates to avoid duplicates
- I have clearly described the agent's purpose and functionality
- I have identified the required protocols and integrations
- I understand this agent will be created in the typescript/community/ directory
- I will wait for the Vibekit team to approve this issue before continuing to implementation