Skip to content

Feat/radiant strategy pack#335

Draft
Lexiie wants to merge 3 commits intoEmberAGI:mainfrom
Lexiie:feat/radiant-strategy-pack
Draft

Feat/radiant strategy pack#335
Lexiie wants to merge 3 commits intoEmberAGI:mainfrom
Lexiie:feat/radiant-strategy-pack

Conversation

@Lexiie
Copy link

@Lexiie Lexiie commented Nov 26, 2025

📝 Summary

This PR introduces the Radiant Strategy Pack, a full suite of DeFi agent templates designed for the Vibekit ecosystem.
It builds directly on top of the Radiant Lending Plugin (added in PR #? / branch feat/radiant-lending-plugin) and fulfills the architecture needed to automate Radiant lending on Arbitrum.

This PR adds:

Related Issues

Type of Change

  • 🐛 Bug fix
  • ✨ New feature
  • 🛠 Protocol integration
  • 🤖 Agent template
  • 🖥 MCP server
  • 📚 Documentation
  • 🔧 Refactor
  • 🧪 Tests
  • 🛠 Tooling/CI

📦 What This PR Accomplishes

✅ 1. Adds Radiant Strategy Pack

Located at:

typescript/community/agents/radiant-strategy-pack/

This pack contains 3 complete Vibekit-compatible strategies:

1. Radiant Leveraged Looping Lender

  • Automates Radiant supply → borrow → supply loops
  • HF-aware looping with safety guards
  • Stops on HF threshold or max loops

2. Radiant Health Factor Shield

  • Monitors real-time HF
  • Executes soft deleverage
  • Hard emergency exit when HF is critically low

3. Radiant Rewards Auto-Compounder

  • Claims RDNT rewards
  • Simulates swap → adds back to collateral
  • Skips if reward < threshold

✅ 2. Adds RadiantClient Abstraction Layer

File:

src/radiantClient.ts
src/radiantFromPlugin.ts

Responsibilities:

  • Wraps Radiant plugin (markets, positions, actions)
  • Normalizes protocol interactions
  • Guarantees safety & data consistency for strategies

✅ 3. Adds CLI Runner

File:

src/cli.ts

Allows end-users to run strategies without coding, for example:

pnpm radiant:loop --asset USDC --maxLoops 5
pnpm radiant:shield --minHF 1.3
pnpm radiant:compound --minRewards 10

✅ 4. Adds Test Suite (Vitest + Mocks)

Location:

test/

Tests include:

  • Looping logic
  • Borrow/supply ordering
  • HF shield soft/hard exit
  • Compound threshold logic
  • CLI argument parsing
  • Mocked RadiantClient behavior

This ensures deterministic behavior without requiring onchain calls.


🧰 Folder Structure Added

typescript/community/agents/radiant-strategy-pack/
  README.md
  package.json
  tsconfig.json
  vitest.config.ts
  src/
    radiantClient.ts
    radiantFromPlugin.ts
    cli.ts
    strategies/
      loopingLender.ts
      healthFactorShield.ts
      autoCompounder.ts
  test/
    radiantLooping.test.ts
    healthShield.test.ts
    compounder.test.ts
    cli.test.ts
    mocks/
      radiantClient.mock.ts

🧪 Testing

Tests Performed

  • Unit tests for all strategies
  • Behavior tests for CLI
  • Plugin interaction simulated via mock client
  • Safety flows manually checked (HF stop, loop termination)

Test Results

All tests pass locally with Vitest.

Steps to Run Tests

cd typescript/community/agents/radiant-strategy-pack
pnpm install
pnpm test

📌 Additional Notes

  • This PR is built on top of your previous branch: feat/radiant-lending-plugin
  • Fully aligned with Vibekit’s DeFi agent architecture
  • Designed to be a reusable, community-focused agent pack

✅ PR Ready for Review

Please review and let me know if any structural adjustments are needed.

closes #334

@Lexiie
Copy link
Author

Lexiie commented Dec 18, 2025

This PR is intentionally kept as Draft.

It depends on the Radiant onchain-actions plugin being merged into the registry.
Once the plugin is merged and the registry path is finalized, this template will be updated accordingly.

@Lexiie Lexiie marked this pull request as draft December 18, 2025 03:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[New Agent Template]: Radiant Strategy Pack (Looping Lender, HF Shield, Auto-Compounder)

1 participant