Unlocking the Potential of BlockEstate’s Staking Smart Contract

BlockEstate
3 min readJul 20, 2023

--

Part 1: Earn Rewards with $BEH Staking

Introduction

Decentralized finance (DeFi) has brought about a paradigm shift in how we manage and interact with digital assets. Among the diverse array of DeFi applications, staking has emerged as an attractive option for users seeking to earn rewards by actively participating in the project. BlockEstate’s staking smart contract presents a golden opportunity for users to stake their $BEH tokens and receive rewards in the form of $USDC tokens. In this article, we will delve into the workings of the smart contract, explore its functions and roles, and understand the rewards distribution algorithm that ensures fair and transparent rewards for stakers.

Tokens Used and Contract Administration

At the core of the BlockEstate staking smart contract lies the interplay between two essential tokens: the $BEH token and the native Arbitrum $USDC token. The $BEH token serves as the staking currency, representing the user’s commitment to the project. In contrast, the $USDC token acts as the reward currency, driving incentives for users to stake their tokens.

The BlockEstate team is going to operate the staking contract with highest levels of conscientiousness and integrity, fulfilling the role of administrator and operator.

Rewards Distribution Algorithm: Ensuring Fairness and Accuracy

A cornerstone of BlockEstate’s staking smart contract is its meticulous rewards distribution algorithm. This algorithm operates on the premise that every new block has a timestamp (date in seconds) that is either equal to or greater than the timestamp of the previous block. By utilizing this temporal information, the contract accurately tracks rewards distribution and ensures equitable allocations to stakers over time.

To illustrate this process, let us consider an instance where an operator adds X rewards tokens for S seconds at block B, with timestamp T. As subsequent blocks Bi materialize, each with a timestamp Ti, we can discern the time elapsed since rewards were initially added: Ti — T. This time delta is crucial in determining the percentage of rewards distributed at each block Bi, calculated as (Ti — T) / S. Consequently, we ascertain the amount of rewards distributed at each block Bi: X * (Ti — T) / S.

It is worth noting that the value of Ti — T is bounded by S. When the first block emerges, having Ti > T + S, the full rewards X have been successfully distributed. This algorithm seamlessly adapts to fluctuations in staking positions (users staking or unstaking) and rewards amounts (operators adding or removing rewards), ensuring that the rewards distribution is continuously refined to match the changing dynamics of the ecosystem.

If you want to check out the code itself, you can do so here!

Earning Rewards as a Staker: Maximizing Your Returns

As a staker participating in BlockEstate’s staking, your actions are intricately tied to rewards accumulation. Every time you stake or unstake $BEH tokens, the contract diligently records the ratio of rewards distributed per staked token since your last interaction. This ratio signifies the rewards earned per token since your most recent update or claim.

With this robust mechanism in place, stakers can confidently engage in the BlockEstate staking smart contract, secure in the knowledge that their rewards are scrupulously tracked and disbursed according to their staking activity. This precision guarantees fair treatment for all stakers.

We are currently testing the contract extensively on test net!

If you are interested in testing it for free, hop on our Discord server and join the community here

Seizing the Rewards

Our staking contract is designed to distribute quarterly profits, over the course of the following three months, equally. Thus, benefitting users who continuously stake their tokens. Through its comprehensive token management and intelligent rewards distribution algorithm, the contract ensures that all stakers are treated fairly and rewarded accordingly. As the DeFi landscape continues to evolve, BlockEstate’s staking smart contract stands as a shining example of how blockchain technology empowers users to grow their digital assets, while actively participating in the burgeoning world of decentralized finance.

--

--

BlockEstate

First on-chain real estate investment fund on Arbitrum