aelf Tech Talks — Profit Contract Interpretation Pt 1

(Abstract)

aelf Developer
aelf
3 min readApr 7, 2020

--

Profit contract: Unified Profit management plan

Abstract

aelf’s main-chain adopts DPoS Consensus Mechanism, which is an important part of the aelf Governance Model to obtain rights and interests by holding or staking Tokens. This creates a requirement for a standard process that can manage profits uniformly, and use it as a basic smart contract. This contract is deployed on the chain in the Genesis Block, and its application includes, but is not limited to, rewards received by production nodes according to blocks produced (as the weight) at the end of a certain term of office. The voters share corresponding rewards by staking ELF in the node voting elections, and DApp contracts allows users to share contract profits by pledging Token.

Profit Scheme (Token Distributed Strategy): Any address can be a Profit scheme manager. Each manager can add a beneficiary to the Profit scheme and set shares for each beneficiary. After that, when the creator of the Profit scheme distributes the profits to the beneficiary(ies) of the project, the corresponding shares will be distributed in tokens. After each profit distribution, the accounting period of the Profit scheme will be increased by one. Depending on the amount of profits paid, the balance will be increased on the virtual address corresponding to the accounting period, and the account holding shares can obtain the corresponding profits. The beneficiary of the bonuses can not only be the account address, but also a sub-profit scheme, and the profit from the sub-profit scheme can be credited directly to its General Ledger. In other words, there can be a cascading structure between Profit schemes.

Definition:

Profit scheme: Token distribution center created by profit contract.

Manager: Manage the beneficiaries of the profit scheme and their corresponding shares.

Beneficiary: The account address(es) on the aelf blockchain used to receive profit tokens. It is important to note that the beneficiary’s share of the profits is obtained by sending a transaction. (Beneficiaries need to fill in their corresponding profit scheme ID, the transaction can be sent by oneself or others.)

Profit scheme virtual address: Each Profit scheme will map a virtual address through its unique scheme ID, which is only used to release profits and has no corresponding public-private key pair (the probability of public-private key pair collision is negligible).

Sub profit item: each profit scheme may become a sub profit item. The Sub profit scheme can hold shares of its main profit scheme, so that when the main profit scheme releases profit, the virtual address of the sub profit item will get corresponding tokens.

Claim profits: as an ordinary user, you need to send a transaction to get the profit you deserve. This is to avoid too many registered receiving addresses, and the execution of the transaction releasing the profit timeout.

Shares: Shares are a certificate that each beneficiary can obtain a corresponding proportion of the profit, that is, Profit amount per beneficiary = Total Profit * Beneficiary Shares / Total Shares.

Distribute profits: the process of converting the balance on the Profit Scheme’s virtual address into ELF through the Bancor Contract and transferring it to the profit receiving address.

Accounting Period: The length of the accounting period shall be controlled by the manager of the Profit Scheme, and the accounting period shall be increased by one after the profit is distributed.

Treasury: Treasury is the largest Profit Scheme in the aelf blockchain. Its main manager is the Treasury contract, and the corresponding manager of two sub Profit Scheme is the election contract. The profit amount comes from the block rewards. At present, for each block produced, the profit amount is increased by 0.125 ELF. At the end of the current term, it will be entered into the general ledger of the Treasury scheme, and the Treasury contract and the election contract are responsible for maintaining seven Profit Schemes.

— Join the Community:

· Get on our Telegram Discord Slack and Kakao channel

· Follow us on Twitter Reddit and Facebook

· Read weekly articles on the aelf blog

· Catch up with the develop progress on Github

· Telegram community in 한국 ,日本語 ,русский ,العربية ,Deutsch ,ItalianoandTiếng Việt,

· Instagram: aelfblockchain

· YouTube Channel: aelf

For more information, visit aelf.io

--

--