plugins/plugin-social-alpha/README.md
A sophisticated trust scoring system for ElizaOS that analyzes trading calls and calculates user trust scores based on performance metrics.
The Marketplace of Trust plugin provides:
src/
├── services/ # Core business logic
│ ├── SimulationService.ts # Consolidated simulation functionality
│ ├── PriceDataService.ts # Price data fetching and enrichment
│ ├── TrustScoreService.ts # Trust score calculation and optimization
│ └── balancedTrustScoreCalculator.ts # Core scoring algorithm
├── frontend/ # React UI components
│ └── LeaderboardTable.tsx # Trust score leaderboard
└── __tests__/ # Comprehensive test suite
npm install @elizaos/plugin-marketplace-of-trust
Add to your .env file:
# API Keys (at least one required)
BIRDEYE_API_KEY=your_birdeye_api_key
DEXSCREENER_API_KEY=your_dexscreener_api_key
# Optional: Helius for token metadata
HELIUS_API_KEY=your_helius_api_key
The balanced trust score algorithm considers multiple factors:
score = profitComponent * profitWeight +
winRateComponent * winRateWeight +
sharpeComponent * sharpeWeight +
alphaComponent * alphaWeight +
consistencyComponent * consistencyWeight +
qualityComponent * qualityWeight
import { MarketplaceOfTrustService } from '@elizaos/plugin-marketplace-of-trust';
// In your plugin definition
export const myPlugin: Plugin = {
name: 'my-plugin',
services: [MarketplaceOfTrustService],
// ... other plugin config
};
// Get user trust score
const trustProfile = await runtime.getComponent(
userId,
'trust_profile',
worldId
);
console.log(`Trust Score: ${trustProfile.data.trustScore}`);
console.log(`Total Calls: ${trustProfile.data.totalCalls}`);
console.log(`Win Rate: ${trustProfile.data.winRate}%`);
Run the comprehensive test suite:
# Unit tests
npm test
# E2E tests
npm run test:e2e
# Test coverage
npm run test:coverage
npm run build
npm run dev
npm run lint
npm run format
npm run typecheck
npm run typecheck to identify type issuesMIT
For issues and questions: