Designing a USDC-based Raffle Contract #4733
Yashwanthh933
started this conversation in
Ideas
Replies: 1 comment 2 replies
-
|
It seem like an interesting project, How long will a Raffle session last? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm working on a smart contract similar to a lottery or raffle system where:
Later, I plan to extend this into a yield-based lottery, where users stake USDC and the contract deposits those funds into Aave or Compound. Only the generated yield will be distributed as the reward.
Users are allowed to stake only while the raffle is in an Open state (i.e., not during the winner selection phase).
If a user withdraws their stake before the raffle cycle ends, both their principal (USDC) and the yield they individually generated should be transferred back to their wallet.
💡 Design Questions
Any advice, patterns, or sample repos are appreciated 🙏
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions