🤖Conservative Staking
ConservativeStaking is a smart contract intended for staking purposes within a blockchain ecosystem. It integrates with other contracts such as ConservativeStakingPool
and utilises Pass
for additional functionalities. This contract is designed to offer a conservative staking mechanism, allowing users to stake tokens, claim profits, and participate in a structured reward distribution system.
Features
Staking: Users can stake tokens in different pools.
Profit Calculation and Distribution: Calculates profit based on staked amounts and distributes it accordingly.
Claiming: Users can claim their profits from individual pools or all at once.
Conservative Pool Management: Supports opening new pools and closing existing ones based on specific conditions.
Contract Structure
Variables
- Stores contract state such as pools, staked amounts, profits, and roles.
Events
- Signals significant actions in the contract like pool openings/closings, staking, claiming, etc.
Public Functions
- Functions accessible to all users for actions like staking, claiming, and viewing contract data.
External Functions
- Functions callable from other contracts, mainly for administrative purposes.
Internal Functions
- Utility functions for internal contract management, not accessible externally.
Functions
getStaked(address staker)
Returns the amount staked by a specific user.
totalClaimed()
Returns the total amount of tokens claimed by all users
totalStaked()
Returns the total amount of tokens staked in the contract
totalProfit()
Returns the total profit generated by the contract
totalStakers()
Returns the total number of users who have staked tokens
getActivePoolCount()
, getStakedPoolsCount(address staker)
, getProfit(address staker)
, getClaimable(address staker)
Provide detailed information about pools and profits.
The ConservativeStaking
contract provides a comprehensive solution for staking mechanisms, emphasizing security with its non-reentrancy guard and flexibility through dynamic pool management
Last updated