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

Make the faucet register users on-chain (instead of Redis) #160

Open
moul opened this issue Sep 26, 2023 · 1 comment
Open

Make the faucet register users on-chain (instead of Redis) #160

moul opened this issue Sep 26, 2023 · 1 comment
Assignees

Comments

@moul
Copy link
Member

moul commented Sep 26, 2023

Objective

Our goal is to pivot the user registration mechanism to a fully on-chain system, phasing out the reliance on off-chain storage methods, specifically Redis. Transitioning to this approach presents the following benefits:

  • Transparency & Decentralization: Emphasizing on-chain processes enhances transparency and decentralization, pushing the boundaries of what's possible with blockchain technology.
  • Ensuring Account Uniqueness: On-chain registration guarantees that each token is linked to a distinct account. This curtails any chances of malpractice such as associating a single token with numerous manually generated accounts.
  • Performance Enhancement: Steering towards on-chain registration limits realm interactions to genuine participants. This safeguards realm performance, preventing a potential overload from a vast number of addresses.
  • Facilitated Dynamic Whitelisting: Other contracts can access the registration realm, enabling dynamic whitelisting. This offers scalability for ensuing blockchain activities and applications that mandate a curated list of approved participants.

Through this on-chain transformation, we further our commitment to harnessing the true capabilities of blockchain, ensuring an efficient and equitable registration experience for our competition.

Implementation Strategy

  1. Faucet Procedure Alteration:

    • Instead of the faucet executing a Send transaction to dispatch tokens to a designated address, it should instead be programmed to trigger an on-chain player registration process. This can be achieved with the following call: -pkgpath r/demo/register -func RegisterPlayer(addr, token) -send XXXugnot.
  2. Registration Contract Functionality:

    • The contract located at r/demo/register has a twofold responsibility:
      • Firstly, it must verify the uniqueness of the account, ensuring no previous claims exist for the given address.
      • Post verification, the contract should record the registration details and subsequently disburse the tokens to the provided address using the capabilities of the std.Banker module.
@moul moul changed the title Make the faucet register users on-chain (instead of Redis) Make the faucet register users on-chain (instead of Redis) Sep 26, 2023
@albttx albttx self-assigned this Sep 26, 2023
@albttx
Copy link
Member

albttx commented Sep 26, 2023

Just on -func RegisterPlayer(addr, token), how do we ensure the player use the same token as it's provided in mailchimp ?

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

No branches or pull requests

2 participants