Skip to content
TechPay
  • Website
  • GitHub
  • Discord
  • Twitter
Search
TechPay
  • betterdocs_homepage

Quick Start

  • Short Guide

Staking

  • Quick start
  • Overview
  • Stake on TechPay
  • Run a Validator Node
  • Run a Read-only node
  • Run a Testnet Validator
  • Testnet Faucet
  • Troubleshooting
  • Run a Full node
  • Run a Testnet read node

API

  • Public API endpoints
  • Getting Started
  • Installation
  • GraphQL Schema Basics
  • Schema Structure
  • Implementation Details and Notes
  • Covalent indexing and querying API

Tutorials

  • Set up metamask wallet
  • Deploy a Smart Contract
  • Set up Metamask (testnet)
  • Verify a Deployed Smart Contract
  • Create a Fixed-cap Asset
  • Create a Variable-cap Asset
  • Create a Local Test Network

Technology

  • Overview
  • Sirius pBFT
  • Proof of Stake
  • Transaction Fees
  • FAQ

How to use Ledger Nano with TechPay

  • Manage TechPay Assets with Ledger Nano S
  • How to Navigate techPay TPC
  • How to Check Your Account Balance
  • How to Receive TechPay Assets
  • How to Send TechPay Assets
  • Ledger FAQ
  • Home
  • Docs
  • API
  • Implementation Details and Notes

Implementation Details and Notes

Table of Contents
  • Rewards Estimation
  • Delegation Limits

Rewards Estimation #

Estimated rewards calculation uses the current status of the blockchain to approximate amount of TPC tokes rewarded for participating in staking. The network uses proof of stake consensus variant to ensure security of the data inside the blockchain structure.

To calculate the rewards we use baseRewardPerSecond value of the latest sealed epoch, but the total staked amount of tokens is calculated elsewhere. The epoch does provide a value of total self-staked tokens in that epoch and also the amount of total delegated tokens, but the first value does not contain temporarily offline nodes and, on the other hand, it includes delegated stake in un-delegation. That means the value is not correct for our calculations.

To get the current total staked value, we iterate all the staking records and collect total staked amount from individual staking.

Delegation Limits #

Delegation limit is calculated from the current self staked amount of a staker by multiplying it by fixed rate, specified in SFC contract. The current value of maximum allowed delegations is 15 times the amount of self staked TPCs.

When we calculate remaining allowed limit, the current delegated amount is subtracted from the total imit. The value is provided by API so you don’t have to deal with the calculation yourself. Please note that tokens in un-delegation does not count towards delegatedMe value and so they don’t count towards spent limit of delegations.

What are your Feelings
Schema StructureCovalent indexing and querying API
Table of Contents
  • Rewards Estimation
  • Delegation Limits

Copyright © 2023 TechPay