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

Protocol Fees (Set to 20%) #5

Closed
wants to merge 1 commit into from
Closed

Protocol Fees (Set to 20%) #5

wants to merge 1 commit into from

Conversation

kgrgpg
Copy link
Contributor

@kgrgpg kgrgpg commented Aug 24, 2022

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

@kgrgpg kgrgpg changed the title Protocol Fees set to 20% Protocol Fees (Set to 20%) Aug 24, 2022
@@ -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}("");
Copy link
Contributor

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.

Copy link
Contributor

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.

@staheri14
Copy link
Contributor

Also, following our call, please create an issue for passing the fee percentage as a constructor argument (instead of being hardcoded).

@kgrgpg
Copy link
Contributor Author

kgrgpg commented Sep 18, 2022

@staheri14 The protocol fees setting via constructor issue can be found at #8

@rymnc
Copy link
Contributor

rymnc commented Jun 12, 2023

Closing this PR as tokenomics hasn't been allotted to rlnp2p, yet

@rymnc rymnc closed this Jun 12, 2023
@rymnc rymnc deleted the ProtocolFees branch June 12, 2023 13:19
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.

4 participants