-
Notifications
You must be signed in to change notification settings - Fork 6
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
Protocol Fees (Set to 20%) #5
Conversation
@@ -86,7 +88,8 @@ contract RLN { | |||
members[_pubkeyIndex] = 0; | |||
|
|||
// refund deposit | |||
(bool sent, _) = receiver.call{value: MEMBERSHIP_DEPOSIT}(""); | |||
uint256 withdrawableDeposit = MEMBERSHIP_DEPOSIT * (WAD - PROTOCOL_FEES_PERCENTAGE) / WAD | |||
(bool sent, _) = receiver.call{value: withdrawableDeposit}(""); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please also add comments next to each code line to elaborate on what is happening.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please also add comments next to each code line to elaborate on what is happening.
@kgrgpg Once the comment is addressed, let me know to re-review.
Also, following our call, please create an issue for passing the fee percentage as a constructor argument (instead of being hardcoded). |
@staheri14 The protocol fees setting via constructor issue can be found at #8 |
Closing this PR as tokenomics hasn't been allotted to rlnp2p, yet |
This is the implementation for incorporating the fees that will be reserved for protocol usage. The commission collected can be used for incentivising different stakeholders. The current fees is set to 20 % and hard coded to take into account the format of decimals in solidity language. This code only aims to hold back the commission and does not show how to utilise or withdraw it from the contract at the moment. The issue for the same can be found at vacp2p/rfc#485