🌊Hold-to-Earn Technical Spec

The Charisma Protocol's hold-to-earn system introduces a novel approach to non-custodial yield generation through continuous token holding.

Introduction

The Charisma Protocol's hold-to-earn system introduces a novel approach to non-custodial yield generation through continuous token holding. Unlike traditional staking mechanisms that require token lock-up, this system allows users to maintain full control of their assets while earning rewards based on their holding patterns. The system employs advanced mathematical models to ensure accurate, fair reward distribution while maintaining computational efficiency within blockchain constraints.

System Architecture

The hold-to-earn mechanism operates through a network of specialized "engine" contracts, each dedicated to a specific token within the protocol. These engines implement a standardized interface that enables consistent reward calculation across different tokens while allowing for token-specific parameters and modifications. At the core of each engine is an integral-based calculation system that measures the time-weighted value of token holdings.

The architecture employs a three-tiered structure: the base engine layer handling core calculations, a modification layer applying quality and incentive adjustments, and a security layer ensuring system integrity. This separation of concerns allows for targeted upgrades and modifications while maintaining system stability.

Mathematical Framework

Balance Integral Calculation

The fundamental innovation of the hold-to-earn system lies in its use of integral calculus to measure token holding value over time. Rather than using simple time-locked staking or periodic snapshots, the system calculates the area under the balance curve between two blocks:

The integral is approximated using the trapezoidal rule, with the number of sample points dynamically adjusted based on the time period. This approach provides a balance between accuracy and computational efficiency. For a time period T with n sample points, the system calculates:

∫(balance(t) dt) from t₁ to t₂

This calculation captures not just the duration of holding but also accounts for any balance changes during the period, providing a more accurate representation of user participation.

Sample Point Distribution

The system implements a dynamic sampling mechanism that adjusts based on the time period being calculated. This adaptive approach ensures computational efficiency while maintaining accuracy across different holding durations. The sampling strategy employs five distinct levels of granularity:

For very short periods (under 12 blocks), a simple two-point calculation suffices. As the duration increases, the system automatically scales up to use more sample points, reaching a maximum of 39 points for periods exceeding 10,000 blocks. This graduated approach ensures that computational resources are used efficiently while maintaining required accuracy levels.

Quality Score Integration

The effectiveness of the hold-to-earn system is enhanced through a sophisticated quality score system that modifies base generation rates. This scoring system takes into account multiple factors to incentivize beneficial protocol behavior and ensure system sustainability.

Score Components

Quality scores incorporate three primary components: token velocity, protocol participation, and market stability. Token velocity measures the trading patterns of holders, rewarding stable holding while discouraging excessive turnover. Protocol participation tracks meaningful interaction with the system's features. Market stability considers the holder's impact on overall token economics.

Dynamic Adjustment Mechanism

The quality score system employs a dynamic adjustment mechanism that responds to both individual holder behavior and broader market conditions. This ensures that the system can adapt to changing conditions while maintaining incentive alignment. The adjustment process uses rolling windows for metric calculation, allowing for smooth transitions in score modifications.

Implementation Considerations

Computational Efficiency

The system's implementation carefully balances accuracy with gas efficiency. The adaptive sampling mechanism ensures that computational resources are used optimally, with more sample points allocated to longer time periods where accuracy is more critical. All calculations are designed to operate within blockchain gas limits while maintaining precision.

Security Architecture

Multiple security layers protect the hold-to-earn system. The engine contracts implement strict access controls through the Dungeon Keeper system. All calculations include overflow protection and edge case handling. The system also features circuit breakers that can limit maximum generation rates if abnormal conditions are detected.

Conclusion

The hold-to-earn system represents a significant advancement in non-custodial yield generation. By combining sophisticated mathematical models with practical blockchain implementation considerations, it provides a robust foundation for token holder rewards while maintaining system security and efficiency. The system's modular design and upgradeability ensure it can evolve with the protocol's needs while maintaining its core functionality.

Future Developments

Several enhancements to the hold-to-earn system are under consideration for future implementation. These include advanced quality score components, additional sample point optimization techniques, and enhanced integration with other protocol components. All potential upgrades will maintain the system's core principles of non-custodial operation and mathematical accuracy.

Last updated