Possible resolution to the challenge #14
Open
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.
Gm!
I tried to solve the challenge in a "simple" way. It allows to scale to many users without use recursion or iterations.
For security reasons, the users by itself need to pull their rewards. And, it's not compounded.
User deposits ETH, user gets ETH.
There are some things that can be improved (for example, safemath). Or tests, tests are terrible, and not prove border conditions. Syntax and gas consumption can be improved A LOT.
About me, I'm an Electronics Eng. with experience developing software (in the past, for secure platforms like SIM and EMV cards). I love Blockchain technology (not only dev, economics too!), and how it can bring new solutions.
Feedback will be appreciated :)
Thank you!