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

explorer: enable direct donation to project #3532

Open
1 of 4 tasks
thelostone-mc opened this issue Jun 24, 2024 · 3 comments
Open
1 of 4 tasks

explorer: enable direct donation to project #3532

thelostone-mc opened this issue Jun 24, 2024 · 3 comments
Assignees

Comments

@thelostone-mc
Copy link
Member

thelostone-mc commented Jun 24, 2024

  • Add button to donate directly to project on explorer
  • Make contract changes to make this possible
  • Ensure project owner can get funds (either automatically / via claim)
  • Track events via indexer
@thelostone-mc thelostone-mc converted this from a draft issue Jun 24, 2024
@thelostone-mc thelostone-mc changed the title explorer: Add Direct Donate button explorer: enable direct donation to project Jun 24, 2024
@0xKurt
Copy link
Member

0xKurt commented Jun 24, 2024

Re: Contract changes

Ways to implement the direct donation

1. Donate to Any Address

  • Description: Donations are directly transferred to any specified address.
  • Pros:
    • Quick to build and implement.
  • Cons:
    • We cannot link donations to specific projects.
  • Note:
    • Passing the project ID with the address is not feasible because it allows for the possibility of mismatching any project ID with any address.

2. Transfer Using Project ID

  • Description: Donations are made using a project ID, and the owner's address is queried from a registry.
  • Pros:
    • Allows us to match donations to specific projects.
  • Cons:
    • Projects need to have a profile on the blockchain they wish to receive donations on.
  • Note:
    • The profile needs to be created during the donation process, which increases the cost of the contract call.
    • Alternatively, projects must create profiles on the relevant chains beforehand, and we need to filter them on the frontend, which adds more work.

3. Donations to the Anchor of a Project

  • Description: Donations are directed to an anchor address associated with a project.
  • Pros:
    • Simple to integrate at the contract level.
    • Allows for tracking the donation history of a project based on the anchor address.
  • Cons:
    • We need to develop a claim functionality.
    • The anchor address changes when the profile name changes, so we must ensure that previous/legacy anchors are tracked as well.

4. Passing the Owner's Wallet and Nonce

  • Description: Donations are made by passing the owner's wallet and the nonce used to create the wallet. The nonce can be fetched off-chain.
  • Pros:
    • Straightforward and easy to implement.
  • Cons:
    • A random nonce could be passed, leading to potential mismatches.
    • We might not care about these mismatches if they are infrequent or insignificant.
  • Note:
    • On contract, we can reassemble the project ID and emit this ID as the project ID of the donation.

Each method has its advantages and disadvantages, and we need to consider our priorities and resources to choose the best approach.

@codenamejason
Copy link
Contributor

  1. We will lose the donation history if we do like this - may work in an emergency type situation but wouldn't suggest this as a feature.

  2. This seems a bit clunky for lack of better words, adding the extra profiles and then sorting.

  3. The time constraint and effort of building out a claim functionality makes me want to pass on this.

  4. I support this approach, it seems the most straightforward way to go with minimal risk.

@thelostone-mc
Copy link
Member Author

4 seems to cleanest way cause :

  • We have the owner address
  • If we mess up the nonce -> the funds still goes to the right place
  • No extra gas is spent on creating profiles
  • Allows us to support donation for profile on chain where it is not ported

@thelostone-mc thelostone-mc moved this from In Progress to Stopped in Blue Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Stopped
Development

No branches or pull requests

3 participants