💛
BETFIN DOCS
ABOUT BETFIN
ABOUT BETFIN
  • ⭐INTRO
  • 🎯TERMS & CONDITIONS OVERVIEW
  • 📗FAQ OVERVIEW
  • TOKENOMY
    • 🪙BET Token
      • 💛Buy BET token
    • 📊BET initial distribution
      • 📊Team Pool
      • 📊Partners Pool
      • 📊Airdrop Pool
      • 📊Affiliate Pool
      • 📊Bonus Pool
    • 💹Vesting & Unlock plan
    • 🔏Liquidity and lockups
      • Community lockup
      • Team.finance lockups
    • 📗Tokenomy FAQ
  • BETFIN GOVERNANCE
    • 📄Betfin Contract Addresses
      • 👀Verify contracts
    • 🏩Betfin governance
      • ⚙️Timelock Principle
      • ⚙️Multisignature (multisig) Principle
    • 👁️‍🗨️Internal Wallets & External Contracts
    • 📗General FAQ
  • SMARTCONTRACTS DESCRIPTION
    • 🌍Contracts Overview
    • 🤖Core
      • 🤖Partner
      • 🤖Tariff
    • 🤖Conservative Staking
      • 🤖Conservative Staking Pool
    • 🤖Dynamic Staking
      • 🤖Dynamic Staking Pool
    • 🤖Pass Contract
      • 🤖Affiliate Member
    • 🤖Affiliate Contract
      • 🤖Affiliate Fund
    • 🖥️Game Interface
    • 🖥️Bet Interface
    • 📟Predict Contract
      • 📟Predict Game
    • 📟Roulette
      • 📟Roulette Bet
    • 🐞Error Codes
  • AUDITS & BUG BOUNTY
    • ☢️Betfin security audits
    • 🔰Bug Bounty
    • 👷Report an Issue
  • For Developers
    • 💻Web Template
    • 📑Smart Contract Template
Powered by GitBook
On this page
  • Features
  • Contract Structure
  • Functions
  1. SMARTCONTRACTS DESCRIPTION

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

Element
Description

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

Function name
Description

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.

Function name
Description

stake(address staker, uint256 amount)

Allows a user to stake a specified amount of tokens.

claim(address pool), claimAll()

Allows users to claim profits from specific or all pools.

withdraw(address pool)

Allows users to withdraw their staked amount from a specific pool.

Function name
Description

setCalculatingWindow(uint256 _window)

Adjusts the calculation window for profit distribution

setMinAllowedAmount(uint256 _amount)

Sets the minimum amount of tokens that can be staked.

newPool()

Manually triggers the creation of a new staking pool.

The ConservativeStaking contract provides a comprehensive solution for staking mechanisms, emphasizing security with its non-reentrancy guard and flexibility through dynamic pool management

PreviousTariffNextConservative Staking Pool

Last updated 6 months ago

🤖