onflow / developer-grants

Grants for developers that contribute to the broader developer ecosystem
Apache License 2.0
50 stars 18 forks source link

Coupon-based Grant System #69

Open jacob-tucker opened 2 years ago

jacob-tucker commented 2 years ago

Coupon

Grant category

Description

I would like to make a smart contract that allows entities to send tokens (like $FLOW) to a specific project/DApp that are only able to be used inside of that DApp. Here is an example:

The Dapper team wants to give a grant to Flovatar community members, but wants to make sure that the grant given to those community members is only spent within that community. Meaning, those community members couldn’t go and use that $FLOW to purchase a Goated Goat, rather they would have to spend their “coupon” (as I call it) on Flovatar itself.

Problem statement

Proposed solution

My proposed solution is a contract that allows communities/DApps to set up a “Vault”. This Vault will have a system that tracks token balances per each user in that community. For example: Emerald City sets up a Vault in their account that looks like: Jacob Tucker -> $FLOW -> 10.0 -> $STARLY -> 50.0 Person 2 -> $FLOW -> 5.0 -> $STARLY -> 0.0


Then, when Emerald City sets up a DApp that requires users to purchase something, we will embed a call to this contract inside of our transaction that will handle purchases automatically. So instead of simply withdrawing X amount from a user’s vault and depositing it to our community’s Vault, it will:

  1. Go through the coupon Vault
  2. Check to see if the user has any available coupons for the token in question
  3. Use whatever coupons available
  4. Continue the purchase normally

Impact

Milestones and funding

Milestone Deliverables Timeline Risks USD proposal
1 - MVP Smart Contract, Transactions and Scripts 2 weeks - 10,000
2 - Adoption Creating tutorials (written/video) for Dapper to give coupons to communities, and tutorials (written/video) for projects to integrate the coupon system 1 week - 1,500
3 - Maintenance This is to maintain the contract in a proper manner given frequent Cadence updates Indefinitely - 1,000
4 - TBD Website (Only if found beneficial) This would be to create a website to allow users to view their coupon balances across different projects, and also allow communities/DApps to view their users' balances in their community. This funding would go to the Emerald City developer community to build the website and get developers involved in real-world DApp building. 3 weeks - 10,000

Team

Name Role Bio Contact
Jacob Tucker Smart Contract Developer ... jacobtucker818@gmail.com
alxflw commented 2 years ago

thanks for the submission @jacob-tucker, we'll review and get back to you soon

chrisackermann commented 1 year ago

Hi @jacob-tucker! Just wanted to send a quick update that we're still working through the review of this proposal - apologies for the long lead time on this one and aiming to have an update for you soon.

jacob-tucker commented 1 year ago

No worries @chrisackermann - thank you for keeping me in the loop :)

jacob-tucker commented 1 year ago

Hi there @chrisackermann ! Just wanted to check if the team still had interest in this proposal. Thank you, and happy holidays 🥳

Itahand commented 1 year ago

This is extremely necessary.

jacob-tucker commented 1 year ago

Would still love to make it @Itahand , wondering if there is still a need on Flow side

Itahand commented 1 year ago

I know from first hand experience that there is. I don't know if this solution exactly, but there's definitely a need to make sure/verify that grants are used in the most ethical/efficient way.