Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [gambling]

The tag has no usage guidance.

1
vote
1answer
56 views

Preventing manipulation of random number generation for casino contract

I'm reading through the accepted answer to this question on securely creating random numbers for multiplayer blockchain-based casino games. I don't understand the reason for step 4: "Users send their ...
1
vote
1answer
165 views

I have 2 questions. 1: Is it possible to generate an array of random numbers, with every number to distinct, say 10 numbers in range of 0 and 1000?

I know, that using block hash or timestamp is not secure for gambling applications, and I know that I can use Oraclize to get a real random number. But is it possible to ask for an array of distinct ...
0
votes
0answers
12 views

create an address for web gambling

i'm making a web gambling with code from bustabit I am confused how to get / create a wallet with the method of API or other web wallet, because I want to use ethereum as its currency maybe you can ...
0
votes
1answer
105 views

How does secure communication (e.g. HTTPS) with a Smart Contract work?

I'm working on a smart contract to run a fair lottery game. The winner is chosen by way of random number generation. The current plan is to get the random number from an oracle source. However, this ...
3
votes
0answers
906 views

Is this approach to an ethereum lottery sound and/or novel?

I'm looking at making gambling apps is ethereum. Currently made a contract that can flip a coin. After looking at this question: How can I securely generate a random number in my smart contract? and ...
6
votes
1answer
206 views

What are the challenges in creating a peer2peer coin flipping contract in ethereum?

I wish to make a contract that will allow two (eventually possibly more) people to gamble on essentially flipping a coin using ethereum. One person will not be "gambling against the contract" but ...
3
votes
1answer
58 views

How can I distribute an amount of ether between a number of addresses based on percentages?

full contract code I have a contract (code above) where ether is bet on either side 0 or side 1. A winning side is determined (payout function), and the amount of ether that a winner will receive is ...
4
votes
2answers
121 views

How is consensus in the state achieved if contracts have random output?

I'm quite new to Ethereum so forgive my lack of detail and awareness in this question. I've seen some gambling applications built on Ethereum and I'm wondering how the network agrees on the outcome ...
5
votes
1answer
166 views

the etherdice's detailed algorithm

according to this link about etherdice, the game needs both players provide a seed and combine them together as the input of a RNG(random number generator) to generate the dice number, but one problem ...
3
votes
2answers
354 views

how to develop a multi-step game with the contract

I want to develop a multi step gambling game, my question is can several transactions be sent to the game contract separately(some first, some after) but all contribute to the result?
2
votes
0answers
130 views

Using External API in a Contract? [duplicate]

Is it possible (and feasible) to have a solidity contract connect to an external api and execute a contract based on what is found? For example betting on sports games by agreeing to a credible API ...
3
votes
0answers
76 views

Which is the safest way to generate a random number? [duplicate]

I need a function that generates a random number from 0 to n for the lottery. I found 2 ways to do that: 1. https://gist.github.com/alexvandesande/259b4ffb581493ec0a1c But miners can influence the ...
7
votes
3answers
2k views

Are there any dice / casino gambling games / smart contracts for ethereum yet?

Are there any dice / casino gambling games / smart contracts for ethereum yet? Where can I get a list of them?
133
votes
13answers
33k views

How can I securely generate a random number in my smart contract?

If I am writing a smart contract for some kind of (gambling) game, how can I generate a random number securely? What are the best practises and security trade-offs to be aware of?