[Mainnet] Dividend Token Contract#27
Open
YakupIpek wants to merge 15 commits intostratisproject:masterfrom
Open
[Mainnet] Dividend Token Contract#27YakupIpek wants to merge 15 commits intostratisproject:masterfrom
YakupIpek wants to merge 15 commits intostratisproject:masterfrom
Conversation
mrtpain
reviewed
Dec 31, 2020
mrtpain
reviewed
Dec 31, 2020
mrtpain
reviewed
Dec 31, 2020
mrtpain
reviewed
Dec 31, 2020
mrtpain
reviewed
Dec 31, 2020
mrtpain
reviewed
Dec 31, 2020
mrtpain
reviewed
Dec 31, 2020
mrtpain
reviewed
Dec 31, 2020
mrtpain
requested changes
Dec 31, 2020
Collaborator
mrtpain
left a comment
There was a problem hiding this comment.
Requesting changes be made due to GetWithdrawableDividends methods multiplication.
https://github.com/stratisproject/CirrusSmartContracts/pull/27/files#r550697142
If you write tests for this and every day real scenario values, you will find overflow exceptions very easily breaking the contract.
mrtpain
reviewed
Jan 28, 2021
mrtpain
approved these changes
Jan 28, 2021
Collaborator
mrtpain
left a comment
There was a problem hiding this comment.
One comment/question otherwise lgtm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Dividend Token Contract
DividendToken designed to share dividends for token holders. Token holders will get same percentage of holded token from deposited dividends.
An example, an address holds 10% percentage of tokens and 100 CRS token distributed by sending to DistributeDividends method. The address will get 10 CRS (10% of 100 CRS). Earned dividends will remain in address even all of tokens transferred.
The address owner can withdraw owned dividends anytime. GetDividends returns dividend balance and GetTotalDividends returns Withdrawn Dividends + Current Dividend Balance
Compiler
Contract Hash
Contract Byte Code