I’ve created sites for clients that accept donations and it’s fine but I would love to be able to have a simple Marlowe contract that constantly runs an on-the-fly 50/50 raffle. Here’s the idea:
School has 2 accounts - “Escro Account” for receiving ADA for the 50/50 and “Profit Account” that the proceeds are pushed to after a winner is chosen.
User sends X ADA to escro Account. The contract checks the escro account to see if the amount of ADA has reached a pre-determined number. In this case, let’s set it at 100 ADA.
If that deposit pushes the escro account to or over 100 ADA, 50 ADA will be sent back to the user as winnings. 50 ADA will then also be sent to the profit account and the remainder (if any) will be left in the escro account for the next time a user sends ADA to it, starting the process over again.
This prevents those long, drawn out 50/50 raffle fundraisers that can last weeks or months and instead, can be something that stays active throughout - generating constant donations and payouts for the school.
It seems like a simple contract but when it comes to smart contracts, writing, making them live on the blockchain, etc - especially on the Cardano network, I feel like I should retire early and become a chicken farmer.
Any thoughts? Thank you.