Open
Conversation
Some comments: - I've uploaded only the smart contract for this challenge. - As far as I've been able to test it, the full logic of the problem is fulfilled. - Users are able to make multiple deposits along time (their total deposits and contribution is updated when required). - Every time a reward is deposited, at the very same moment, the amount of rewards (fraction) that corresponds to every active user is computed and accumulated. In addition, total rewards are tracked in a state variable. - Users are able to make partial or full withdrawals of their currently deposited funds (if they do partial withdrawal, then they will keep receiving future rewards based on the amount they've left still deposited). - Users are able to make partial or full withdrawal of their currently accumulated rewards. - Math operations could be improved in order to avoid small rounding errors (or use OpenZeppelin safe math library) - Contract was deployed in Kovan Testnet at address: 0x684cc48e69ba9e48f2d156299e09e50f436a863c (TX initiated by 0xffc77adc943099027e182edce951550745561a9d) - Since I am far from being what is usually called as "SW developer" (just a self motivated enthusiast with an Electronic Eng. degree), right now I don't have the JS knowledge required for the development of the test procedures and other stuff... - Feedback from your side regarding the uploaded contract will be appreciated.
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.
Some comments: