-
Notifications
You must be signed in to change notification settings - Fork 54
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
ERC-20 tokens as membership deposit for RLN contract #1058
Comments
Requesting feedback from @staheri14 @fryorcraken @oskarth |
Maybe it's too early for discussing technical implementations, but if a new token is created (in options 4 and 5), consider adding support to https://eips.ethereum.org/EIPS/eip-2612 so it's not necessary to do an For option 1, if SNT is the token to use, maybe a helper function |
Is there a difference in the respective contract API between an ERC-20 token and WETH? I would not scope the minting of token in this work. I think it makes sense to only scope
Other use cases may raise in the future (several ERC-20, ERC-20 token + Eth with discount on token, etc) but they can left out of scope at this stage. |
Agree. To me, ERC20 should basically be a parameter when you deploy the contract. So the contract itself is agnostic to ERC20 address, and deployment of it is a separate concern. It might make sense to have two contracts. One using only ETH, and the other being parametric ERC20. Then depending on what platforms/networks want, they can deploy a specific instance of some ERC20 token. The decision to point an implementation to a specific contract instance is then a separate discussion, so you can imagine that in the future people using the Status protocol would instruct nwaku to use the SNT ERC20 address, but a different platform could conceptually deploy their own thing and point nwaku to that. |
These are great points and I agree! Big difference for usability. Just to check:
|
This issue is also in the wrong repo, it should either be in the RLN repo (which should live under vacp2p GH org) or the research repo |
Moving this issue under the correct organisation and repo. Refer to vacp2p/rln-contract#1 and continue all future discussions there. |
The currently used RLN membership contract as implemented in https://github.com/kgrgpg/rln/blob/main/contracts/Rln.sol , accepts the payment in ETH for
register
function. This acts as the stake of the member in the RLN group that gets slashed when the member misbehaves like spamming the peer to peer network.There have been request to support ERC-20 tokens as membership deposit for the contract. But detailed discussion and implementation over the said functionality has not taken place and this issue will address it.
The implementation of ERC-20 token can take place in multiple ways. Some of them are listed as follows and require different technical implementations in Solidity smart contracts:
The complexity of the implementation goes higher as we move down the above list. We need to discuss the most valid ones and move towards them.
The text was updated successfully, but these errors were encountered: