Zico Agent is an artificial intelligence solution based on an agent designed to extract and provide data from multiple blockchains efficiently and at scale. The core idea of the project is to integrate multiple data sources into a single access point, using language models (LLM) technology to transform user interactions into a seamless and intelligent experience.
Zico Agent was developed to enable the querying and extraction of data from different blockchains, offering a simple and fast method to interact with these decentralized data networks. Our goal is to facilitate access to information in an accurate way, providing responses based on up-to-date blockchain data.
Follow the steps below to install and run Zico Agent locally. Make sure Docker is installed and properly configured on your machine.
-
Clone the repository:
First, clone the repository to your local machine using Git:
git clone https://github.com/Panorama-Block/zico_agents.git
-
Install Docker dependencies:
Navigate to the
zicoagents_dockersfolder, which contains the Docker configuration files, and run Docker Compose:cd zicoagents_dockers docker-compose upNote: The first time you run this command, it may take a while as Docker needs to build the containers and download the required images.
-
Access the Frontend:
Once Docker Compose is up and running, open your browser and access the following URL to view the project’s frontend:
http://localhost:3333The frontend is the interface where you can interact with the agent.
Once the system is up and running, you can access the user interface (frontend) and chat with the agent. The agent is configured to respond to preset questions related to blockchain data, and you can even create new questions to get personalized answers.
- Preset Questions: The system comes with a set of predefined questions you can use to start exploring the data.
- Create New Questions: You can formulate new questions for the agent, which will attempt to provide the most accurate responses based on the data extracted from the blockchains.
- Questions about the current state of a blockchain.
- Specific queries about transactions or smart contracts on particular blockchains.
- Get trending crypto news.
Zico Agent leverages several modern technologies to ensure efficiency and scalability:
- LLM Model: The language model used is Ollama, a highly optimized model capable of processing large volumes of data, with 3 billion parameters, offering intelligent and contextualized responses.
- Development: The solution is built in Python, using the Langchain library to develop the conversational agent, enabling seamless integration with various APIs and data sources.
- Containerization: We use Docker to ensure the application is easy to configure, scale, and run in different environments. Docker Compose is used to orchestrate the necessary containers for the system to function.
The Suzaku Staking System is a sophisticated DeFi protocol that implements advanced staking mechanisms with two main components: basic staking (SuzakuStaking) and restaking with bonus rewards (SuzakuRestaking). The system is designed to provide users with flexible staking options while maintaining security and efficiency.
The basic staking contract implements core staking functionality with the following features:
-
Deposit & Withdrawal
- Users can deposit tokens for staking
- Minimum staking period of 30 days
- Support for fee-on-transfer tokens
- Permit2 integration for gasless approvals
-
Rewards
- Base annual reward rate of 5% (500 basis points)
- Dynamic reward calculation based on time elapsed
- Configurable reward rate (max 10%)
- Rewards are automatically calculated and distributed
-
Security Features
- SafeERC20 for secure token transfers
- Reentrancy protection
- Comprehensive error handling
The restaking contract extends the basic staking functionality with additional features:
-
Enhanced Rewards
- Base staking rewards (5% APR)
- Bonus rewards for restaking (0.5% per restake)
- Compound interest through restaking mechanism
-
Restaking Mechanics
- Maximum of 10 restakes per stake
- Restake bonus increases with each restake
- Accumulated rewards are automatically added to stake
-
Additional Features
- Tracking of restake count and total restaked amount
- Separate bonus calculation system
- Enhanced reward distribution system
Factory (abstract)
├── StakingFactory
│ └── SuzakuStaking
└── RestakingFactory
└── SuzakuRestaking
MINIMUM_STAKING_PERIOD: 30 daysBASIS_POINTS: 10000 (100%)DEFAULT_REWARD_RATE: 500 (5%)RESTAKE_BONUS_RATE: 50 (0.5%)MAX_RESTAKES: 10
The system supports various token types:
- Standard ERC20 tokens
- Fee-on-transfer tokens
- Permit2-compatible tokens
Currently integrated with:
- sAVAX
- BTC.b
- AUSD
- SolvBTC
- COQ
- ggAVAX
// Deposit tokens
stakingContract.deposit(recipient, amount);
// Check rewards
uint256 rewards = stakingContract.calculatePendingRewards(address);
// Withdraw staked tokens
stakingContract.withdraw(recipient, amount);
// Claim rewards
stakingContract.claimRewards();// Initial deposit
restakingContract.deposit(recipient, amount);
// Perform restake
restakingContract.restake();
// Check stake info
(amount, startTime, lastRewardCalculation, isStaking, restakeCount, totalRestaked) =
restakingContract.getStakeInfo(address);-
Access Control
- Factory pattern for controlled deployment
- Modular permission system
-
Safety Mechanisms
- Minimum staking periods
- Maximum restake limits
- Safe math operations
-
Error Handling
- Custom error types
- Comprehensive input validation
- Clear error messages
The system includes comprehensive test suites for both staking and restaking contracts:
- Unit tests for all core functions
- Integration tests for complex scenarios
- Fuzzing tests for edge cases
- Time-dependent test scenarios
- Solidity ^0.8.25
- Foundry/Forge for testing
- OpenZeppelin contracts
forge buildforge testSuzaku is a DeFi protocol focused on providing innovative staking solutions. The protocol emphasizes security, efficiency, and user value through its dual staking system. By combining traditional staking with restaking mechanics, Suzaku creates new opportunities for yield optimization while maintaining robust security measures.
The protocol integrates Chainlink's decentralized oracle network to provide reliable price feeds and enable sophisticated price analysis and swap functionality. This integration is implemented through two main contracts: Analysis.sol and Swap.sol.
The Analysis contract provides price feed aggregation and analysis capabilities:
-
Price Feed Integration
- Multiple Chainlink price feeds for major assets:
- AVAX/USD
- BTC/USD
- ETH/USD
- USDC/USD
- USDT/USD
- DAI/USD
- LINK/USD
- Multiple Chainlink price feeds for major assets:
-
Features
- Real-time price data access
- Historical price tracking
- Pair address computation for UniswapV2-compatible DEXes
struct PriceFeedInfo {
string pair;
AggregatorV3Interface feed;
}The Swap contract extends the analysis capabilities with trading functionality:
-
Core Features
- Price-feed-based swap validation
- Integration with UniswapV2 pairs
- Support for ERC20 token swaps
-
Security Measures
- Price deviation checks
- Slippage protection
- Safe token transfer handling
// Example of price feed initialization
feeds.push(PriceFeedInfo("AVAX/USD", AggregatorV3Interface(0x0A77230d17318075983913bC2145DB16C7366156)));
feeds.push(PriceFeedInfo("BTC/USD", AggregatorV3Interface(0x2779D32d5166BAaa2B2b658333bA7e6Ec0C65743)));
feeds.push(PriceFeedInfo("ETH/USD", AggregatorV3Interface(0x976B3D034E162d8bD72D6b9C989d545b839003b0)));-
Price Aggregation
- Multiple oracle sources
- Weighted average calculations
- Heartbeat checks for data freshness
-
Swap Functionality
- Direct token swaps
- Price-feed-based routing
- Liquidity pool integration
-
UniswapV2 Integration
- Pair address computation
- Liquidity pool interaction
- Price impact calculation
Chainlink Integration
├── Analysis.sol
│ ├── Price Feed Aggregation
│ └── Pair Analysis
└── Swap.sol
├── Token Swaps
└── Price Validation
// Get price feed information
PriceFeedInfo[] public feeds;
// Access specific price feed
AggregatorV3Interface feed = feeds[0].feed;
(, int256 price,,,) = feed.latestRoundData();// Calculate UniswapV2 pair address
address pair = pairFor(factory, tokenA, tokenB);-
Oracle Security
- Multiple price feed sources
- Deviation thresholds
- Minimum update frequency checks
-
Swap Safety
- Price validation
- Maximum slippage limits
- Reentrancy protection
-
Error Handling
- Comprehensive input validation
- Fallback price sources
- Clear error messages
-
Reliable Price Data
- Decentralized oracle network
- High-quality price feeds
- Regular updates
-
Enhanced Trading
- Price-aware swaps
- Efficient routing
- Reduced price manipulation risks
-
Risk Management
- Price deviation protection
- Liquidity validation
- Transaction safety checks
This Chainlink integration provides a robust foundation for price discovery and trading operations within the protocol, ensuring reliable and secure token swaps while maintaining price accuracy through decentralized oracle networks.
To run Zico Agent efficiently on your local machine, a powerful computational setup is required, especially to run the Ollama model, which has 3 billion parameters.
- Minimum Requirements:
- High-performance processor
- At least 16GB of RAM
- A recommended GPU to accelerate the model's execution
For more information and updates, check out the Panorama Block repository: repository link.
This project was created by the PANORAMA BLOCK team, a group dedicated to creating innovative and efficient solutions for the blockchain ecosystem and decentralized data.
