You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A reward platform that incentivizes user engagement with the Balanced DeFi platform on ICON blockchain through seasonal tasks and point-based rewards. Users register for seasons and complete various tasks (both on-chain and off-chain) to earn points, which translate to rewards at the end of each season.
System Architecture
The system consists of several distinct services that work together:
Frontend Layer
Hana Rewards Frontend
User interface
Interacts with REST server through NGINX
NGINX Reverse Proxy
Routes requests
SSL termination
Load balancing
API Layer
Hana Rewards REST Server
Public-facing API
Handles frontend requests
Interacts with Auth Server
Auth Server
Manages authentication
User authorization
Session management
Task Manager Layer
A separate service containing multiple components:
Private REST Server
Internal API endpoints
Read-only access to MongoDB
Task management endpoints
Task Producer
Schedules tasks
Creates task messages
Sends to RabbitMQ
Task Consumer
Processes messages from RabbitMQ
Executes task logic
Writes results to MongoDB
MongoDB
Central database
Read by Private REST Server
Written to by Task Consumer
RabbitMQ
Message queue
Connects Producer and Consumer
Task distribution
Service Communication Flow
Component Details
Frontend to REST Communication
Frontend makes HTTP requests through NGINX
NGINX routes to Hana REST Server
Authentication handled by Auth Server
REST Server communicates with Task Manager
Task Manager Internal Flow
Key Responsibilities
Task Production
Schedules task execution timing
Creates task messages based on:
On-chain events (Balanced DeFi activities)
Time-based triggers (daily/weekly tasks)
User actions (off-chain activities)
Publishes messages to RabbitMQ queues
Task Consumption
Subscribes to RabbitMQ queues
Processes task messages
Executes task-specific logic
Updates user progress in database
Calculates and awards points
Task Types
On-chain Tasks
Balanced DeFi interactions
Collateral deposits
Loan management
Savings rates deposits
in the future swaps and tracking other platforms can be integrated
Off-chain Tasks
Daily check-in
Newsletter subscription
Social media engagement
Key Points
Separation of Concerns
Clear separation between public and private APIs
Task execution isolated in Task Manager
Read/Write separation for MongoDB access
Data Flow Control
One-way data flow through the system
Private REST server has read-only access
Task Consumer has write access to MongoDB
Security
Public API separated from task execution
Authentication layer
NGINX as reverse proxy
The text was updated successfully, but these errors were encountered:
Hana Rewards Design Document
System Overview
Purpose
A reward platform that incentivizes user engagement with the Balanced DeFi platform on ICON blockchain through seasonal tasks and point-based rewards. Users register for seasons and complete various tasks (both on-chain and off-chain) to earn points, which translate to rewards at the end of each season.
System Architecture
The system consists of several distinct services that work together:
Frontend Layer
Hana Rewards Frontend
NGINX Reverse Proxy
API Layer
Hana Rewards REST Server
Auth Server
Task Manager Layer
A separate service containing multiple components:
Private REST Server
Task Producer
Task Consumer
MongoDB
RabbitMQ
Service Communication Flow
Component Details
Key Responsibilities
Task Production
Task Consumption
Task Types
On-chain Tasks
Off-chain Tasks
Key Points
Separation of Concerns
Data Flow Control
Security
The text was updated successfully, but these errors were encountered: