Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

My 2 cents #4

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

My 2 cents #4

wants to merge 1 commit into from

Conversation

jppoujade
Copy link

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.

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.
@jppoujade jppoujade changed the title Add files via upload My 2 cents Jan 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant