Overview
The Staxiq User Profile Contract (staxiq-user-profile.clar) is a Clarity smart contract that stores user risk preferences and AI-generated strategy recommendations on the Stacks blockchain.
Risk Profiles
Users set Conservative, Balanced, or Aggressive risk preferences
Strategy History
AI strategy recommendations are hashed and anchored on-chain
Immutable Records
All data is permanently stored and cannot be altered
User-Owned Data
Users maintain full control via their wallet address
Core Capabilities
1. Risk Profile Management
Users can set and update their risk tolerance level on-chain:contracts/staxiq-user-profile.clar
1- Conservative: Low-risk, stable strategies2- Balanced: Moderate risk/reward3- Aggressive: High-risk, high-reward
2. Strategy Anchoring
AI-generated strategies are hashed and stored on-chain for transparency:contracts/staxiq-user-profile.clar
- Cryptographic hash of strategy details
- Target DeFi protocol (e.g., “ALEX”, “Velar”)
- User’s risk level at time of generation
- Block height timestamp
3. Profile Queries
Read user data without gas fees:contracts/staxiq-user-profile.clar
Data Structures
User Profile
Maps wallet address to profile data
Strategy Record
Maps (user, strategy-id) to strategy details
Usage Flow
Example: Complete User Journey
Benefits
For Users
Transparency
View complete history of AI recommendations and profile changes
Ownership
Data is tied to your wallet, not a centralized database
Verification
Cryptographically prove what was recommended and when
Portability
Take your data to any compatible platform
For Staxiq
- Regulatory Compliance: Immutable audit trail for compliance requirements
- Trust Building: Users can verify AI recommendations weren’t changed
- Data Integrity: Blockchain prevents data tampering or loss
- Decentralization: No single point of failure for user data
Contract Address
Testnet:
ST9ZZEP9M6VZ9YJA0P69H313CRPV0HQ1ZNPVS8NZ.staxiq-user-profileView on explorer: Stacks Testnet ExplorerLimitations
Next Steps
Function Reference
Detailed documentation of all contract functions
Integration Guide
Learn how to call contracts from your frontend
Testing
Run tests and verify contract behavior
Deployment
Deploy contracts to testnet or mainnet