TON Staking Pool - stake Grams to blockchain and get rewards

admin

Administrator
Команда форума
Сообщения
649
Реакции
190
Staking pool is built on mutual mistrust principle that protects subscribers from fraudulent operator and hackers attack, and guarantees their funds are operated properly. Pool owner doesn't actually have access to Grams, except the predefined incentive fee, paid periodically depending on performance. Pool can operate multiple nodes to achieve best results from being validator in Telegram Open Network


For what?
  • Community gets the way, that allows being the part of TON blockchain and get benefits from this disruptive technology.
  • Above mentioned process should have positive effect on demand for Gram token.
  • Telegram Open Network get more validators that improves its decentralization.
  • Staking pool one of the most exciting application for blockchain technology.

Smart contracts

To assure subscribers, that no changes are possible in future, I implemented linked smart contract structure, so inititialy pool is deployed with predefined number of nominator smart contract addresses, when each nominator holds an address of the pool. Such deployment scheme allows linking contracts between each other even before deployment and avoiding the situation, when owner replaces any contract with fraudulent or vulnerable one, and prevents from getting an unauthorized access to subscribers Grams.
All staking pool and nominator smart contracts do not work with external messages to avoid the situation, when draining funds is possible because of private key leak.

Pool smart contract

Pool is accounting and management smart contract that is responsible for interacting with users, collecting transfers, calculating rewards, transferring funds between pool and nominators, sending orders to make stakes.

Nominator smart contract

Nominator interacts with pool and elector smart contract. It’s prime function is making stakes and sending report about balance and current stake to pool smart contract. Grams from this contract can be transferred to elector and pool smart contracts only.


Entities

Subscriber - the person who send Grams to pool to get benefits from staking
Owner - the account operating the pool
Assets Under Management (AUM) - total number of grams operated by pool
Units - the shares in pool, owned by subscriber.
Unit Rate - the number of Grams in one unit.
Subscription entry - the record stating the number of grams sent to pool in certain period.
Start period - the period when subscription was open
End period - the period when subscription was redeemed and withdrawn


Stake Pool processes

Subscription - when subscriber transfers Grams to pool smart contract, new subscription entry is created. It contains the information about amount of grams and number of current period. Subscriber can add more grams to subscription entry until new period is started, otherwise new subscription entry will be created.

Redemption - if subscriber wants to get Grams back, he sends redemption order. The amount of Grams is calculated by multiplying number of units, calculated by dividing number of grams initially sent to rate in subscription period, and multiplying this number to rate of the most recent closed period.

Closing the period - the process of recalculation AUM, number of units and unit price. Smart contract needs to fetch balances and stakes from all nominators, subtract withdrawn units, calculate incentive fee and determine new unit rate, so the number of units for new subscriptions will be calculated and new redemptions will be processed according to that rate.

Incentive fee - owners reward is calculated as a percent from growing the rate multiplied to managed funds in current period that is equal to initial AUM. New subscription is issued for the owner in the new period according the the new rate calculated by dividing AUM subtracted by incentive fee to number of previous subscribers units, so technically this process equally affects current subscribers. Owner can issue redemption order anytime or keep funds in pool to get benefits as well.



134135136



GitHub: https://github.com/koinov/ton-staking
Stake Pool Demo: http://62.210.101.33/ton/dashboard
 
Сверху