🤖Conservative Staking Pool
Overview
The Conservative Staking Pool contract implements a staking pool where users can stake tokens for a specified duration. It provides functionalities for staking tokens, claiming rewards, withdrawing stakes, and distributing profits among stakers.
Contract Structure
The Conservative Staking Pool contract utilizes AccessControl and ReentrancyGuard from OpenZeppelin for access control and protection against reentrancy attacks.
Variables
duration
: Duration of the staking pool.token
: ERC20 token contract address.totalStaked
: Total amount of tokens staked in the pool.totalProfit
: Total profit earned by stakers.
Functions
stake
: Allows users to stake tokens in the pool.claim
: Allows stakers to claim their rewards.withdraw
: Allows stakers to withdraw their stakes after the staking duration ends.distributeProfit
: Distributes profits among stakers in the pool.
Last updated