Idea for a first application - Lucky Draw

Hi!

I have an idea for a first application I’d like to create but I’m not completely sure all the features I want can be accomplished…

The main idea is to have a lucky draw, lets say 100ADA given to a lucky winner.

I think that part is pretty straight forward, but I also wanted to add the following feature:

  • A new wallet is created and that 100ADA are deposited there, all key files are generated so that a person can recover the wallet easily in Daedalus or Yoroi

This is the feature I’m not sure how to tackle… Any ideas? :slight_smile:

BR,
Juanma - MAIN -

1 Like

I’m not a tech expert, but it seems to me it would be easier to just send ada to an existing wallet. I don’t really understand the need to create a new wallet and transfer the keys to the winner of the draw. Are you trying to make the draw available to people who don’t yet have an ada wallet? Is this kind of like a faucet? Grizzle Guide to Crypto Faucets (Bitcoin, Ethereum & Dogecoin)

1 Like

Exactly, the idea is to open the draw to people that don’t yet have a wallet

1 Like

Great idea, @Juan_Maria_Olaizola! Why not do both? Create a draw for a new person without a wallet, and one for someone with an existing wallet? :man_shrugging:t2:

A paper wallet might be a simple work-around, but than you have to trust the paper wallet creator not to copy/steal the keys they are creating and giving away as a prize. I think I see your purpose more clearly, which is how do you create a funded wallet through a smart contract, where only the winner would be able to access the funds. This might be easy on a small scale with relatively trusted participants, but if it becomes a multi-million $ lottery, than potential issues I see here, are what if the new winner immediately looses access to the wallet through some user error and locks the ada for good. (good for the rest of the community lol) If the winner doesn’t know how to manage their new wallet, it would be almost like burning tokens, locking them away. Also, how exactly do you transfer the new wallet keys securely? email? Wouldn’t this expose the wallet to potential future attacks? This type of use case of bringing in someone from off chain and just giving them a secure wallet without them having to create it, or understand how it works appears to have some security challenges. Maybe a third party like the cardano foundation, or an exchange like Binance would have to be involved with the wallet handover?

Several logistical/technical/security problems may be resolved if the participants were required to create their own wallet as a requirement prior to entering the lucky draw. Once the participant creates their own wallet, their public address is entered into the draw.

That’s actually my plan! I will do the easy part, for people who have already existing wallets, with the purpose of doing the draw as a feature of my pool.
The barrier I see is that I only know python and Fortran a programming languages and it’ll take me some time to actually do this in Haskell… I’ll keep working on it…
As for the second idea, creating new wallets, the issues that @XZact mentions are the barriers I see difficult to overcome now.

1 Like

The K framework acts as a translator for any language into the Haskell-based Cardano blockchain. That’s kind of the idea behind it. They looked at Ethereum which only uses Solidity. Actually, Python is the most used program in the world if I have my facts straight. Cardano wanted to attract developers and programmers, so the idea is that you can translate from any program into the Cardano blockchain be it Java or C++ etc.

if as part of the entry to whatever sweepstakes program you have, you require both email and mobile number. when winner is selected you transmit in email notification of them winning with link to the newly created and funded wallet along with first 6 seed words. the 2nd 6 seed words you send by text.
this would eliminate possibility of email hack.
just a thought.