DeFi Agent
DeFi Agent
The DeFi Agent is ADAS's blockchain operations specialist for the Aptos ecosystem. It handles all on-chain actions across various Aptos DeFi protocols, including token transfers, swaps, lending/borrowing, and staking operations.

Overview
Primary Role: Execute blockchain operations on Aptos
Plugin: @elizaos-plugins/plugin-aptos
Character File: eliza/characters/defi-agent.character.json
Knowledge Base: eliza/characters/knowledge/protocols/
Capabilities
The DeFi Agent can perform a wide range of operations on the Aptos blockchain:
Core Aptos Operations
Token Operations
Transfer APT and other tokens
✅ Implemented
Check balances
✅ Implemented
Get token details
✅ Implemented
Get token prices
✅ Implemented
Token Management
Create new tokens
✅ Implemented
Mint tokens
✅ Implemented
Burn tokens
✅ Implemented
NFT Operations
Create NFTs
✅ Implemented
Transfer NFTs
⚠️ Partial
Burn NFTs
⚠️ Partial
Account Info
Get account details
✅ Implemented
Look up transactions
✅ Implemented
Show account modules
✅ Implemented
Portfolio
View token and NFT holdings
✅ Implemented
Track token values
✅ Implemented
Protocol-Specific Operations
Joule Finance
Deposit
Supply assets to Joule lending pools
✅ Implemented
Borrow
Borrow assets against collateral
✅ Implemented
Repay
Repay borrowed assets
✅ Implemented
Withdraw
Withdraw supplied assets
✅ Implemented
Claim Rewards
Claim JOY token rewards
✅ Implemented
Check Position
View current lending/borrowing position
✅ Implemented
Pool Information
Get details about lending pools
✅ Implemented
Amnis Finance
Stake
Stake APT to receive stAPT
✅ Implemented
Unstake
Unstake APT from stAPT
✅ Implemented
Liquidswap
Swap
Swap tokens on Liquidswap
✅ Implemented
Add Liquidity
Provide liquidity to pools
⚠️ Partial
Remove Liquidity
Remove liquidity from pools
⚠️ Partial
Create Pool
Create new liquidity pools
⚠️ Partial
Thala Labs
Swap
Swap tokens on Thala DEX
✅ Implemented
Add Liquidity
Provide liquidity to Thala pools
✅ Implemented
Remove Liquidity
Remove liquidity from Thala pools
✅ Implemented
Stake
Stake tokens on Thala Protocol
✅ Implemented
Unstake
Unstake tokens from Thala Protocol
✅ Implemented
Merkle Trade
Get Positions
View current trading positions
✅ Implemented
Place Limit Order
Create limit orders at specified price
✅ Implemented
Place Market Order
Execute trades at current market price
✅ Implemented
Close Position
Close existing trading positions
✅ Implemented
Aries Protocol
Create Profile
Create a user profile on Aries Protocol
✅ Implemented
Lend
Lend tokens to Aries lending pools
✅ Implemented
Borrow
Borrow tokens against collateral
✅ Implemented
Repay
Repay borrowed tokens
✅ Implemented
Withdraw
Withdraw lent tokens
✅ Implemented
Implementation Details
The DeFi Agent leverages the Aptos plugin to interact with the Aptos blockchain. The plugin provides a comprehensive set of actions that the agent can use to execute various operations.
Action Flow
User sends a request to the DeFi Agent
Agent parses the request to identify the intended operation
Agent retrieves relevant information (e.g., token prices, gas estimates)
Agent presents transaction details to the user for confirmation
Upon confirmation, agent executes the transaction
Agent monitors transaction status and reports results
Security Measures
Private keys are stored securely and never exposed
All transactions require explicit user confirmation
Risk assessments are provided before executing operations
Comprehensive error handling and recovery mechanisms
Testing
Test Prompts
Use these prompts to test the DeFi Agent's capabilities:
Core Aptos Actions
Token Management
NFT Operations
Joule Finance
Amnis Finance
Liquidswap
Thala Labs
Merkle Trade
Aries Protocol
Future Development
The DeFi Agent is continuously being enhanced with new capabilities:
Short-term Priorities
Comprehensive testing of all implemented protocol integrations
Error handling improvements for complex transactions
Performance optimization for chain operations
Enhanced user feedback for transaction status
Long-term Goals
Support for additional Aptos protocols
Advanced portfolio management strategies
Automated yield optimization
Cross-protocol operations
Resources
Aptos Plugin Documentation
Last updated