Bitcoin Forum
May 21, 2024, 12:52:54 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 3 4 5 6 7 »  All
  Print  
Author Topic: [ANN] BTC Cake - It's a piece of cake.  (Read 18577 times)
Chillance (OP)
Sr. Member
****
Offline Offline

Activity: 310
Merit: 250


View Profile
July 07, 2014, 09:47:34 AM
Last edit: July 07, 2014, 10:19:28 AM by Chillance
 #1

Hey guys and girls,

I was one of those that also lost a sum on the MtGox odeal. And, because who knows when and how much I will ever get back from the loss, I wanted to take action and start something, trying to get some of it back.

I'm also so fed up with all the scam sites out there, so I wanted to create something reliable and trustworthy. Sure, it may take longer earning money when doing it that way, but I'm in it for a long run. Hopefully people will think this is fun and fair so that it can grow with time. Besides, if this keeps giving me some of my lost bitcoins back, I gladly work on it more and keep it up forever.

So, now after more than 2 months of work, I have created what I call "BTC Cake". I'm using Go, Bootstrap, JQuery and among others, BigJS javascript library, to make sure the amount is correct. That is, there should be no rounding errors for real values. However, I'm still in beta, so there is probably still things to fix, which is why I post here. To get feedback and testers. And, maybe even a UI designer. Everything is created by me from scratch! And, I must say that Go is so wonderful to working with. Saved me a lot of time, and, it's so reliable. I love that it's strongly typed, garbage-collected and has explicit support for concurrent programming. Makes it quite perfect for this kind of thing. I really want to make sure everything is calculated correctly.

So, what am I talking about? Well, here is a screenshot of part of the site:


Basically, there is this "cake" where you can bet on a piece/wedge. The result will be based on a secret server salt and users provided salt, which means everybody affects the end result. There will always be a winner, as I only take a small 1% of the winnings. That is, I'm no bank, and the users will get most of the bitcoins. I might add something like some kind of bonus system later on, if this is successful enough. I mean, I can create "bonus" cakes with a chance of winning house money. Anyway, that is for another day.

Note that in the above image I've circled one of the neat features. Here it shows that if that bet of 0.05 BTC is placed, the chance if winning increases from 36.36% to 56.25%, and the user can win 0.03888889 BTC (besides getting his/her initial bet back that is, so total back will be 0.08888889 BTC)

Winning can be quick, depending on the time set, so you don't have to wait for months. Also, cakes can be created by users, so it's up to you what parameters will be set. Also, you can play with play money (PlayBTC) too, so you don't have to use your real bitcoins. I will do something with PlayBTC such as having a timelimit on getting more, so it can't be abused and that it will have a meaning and you just can't get infinite of it. It's free otherwise. This way PlayBTC will have some meaning and it can be fun to play with too.

I will have 2 main ideas going:

  • First one is simple. The cake is split into 2-10 wedges (can easily be increased if it will make sense further down the road). Users bet on a wedge, which will in turn increase the change of winning as you can see in the red circles in the image. After time is up, a value is calculated. This is based on a secret server salt, and users provided salts. This means, noone will know what the result will be. I can't cheat as I don't know what users will use and a hash of the "secret salt" is shown when the cake is created, so anyone can see that this never changes. And, users can't cheat, as they don't know what the secret server salt is before the time is up. The resulting value can be confirmed and calculated any time after time is up. I even provide a handy page showing it all. Anyway, this value is used to figure out which wedge won, and the BTC is shared among the winners equally depending on size of bet the user made.

    It's cool, because every cake can be created by a user, so if you really want to go crazy and be a chance taker, you can set maximum bets to unlimited, and thus, with a cake with 2 wedges, one wedge can be 0.01 BTC, and the other 10 BTC, giving the one with 10 BTC a 99.90% chance of winning. So, it could be an easy steal for the 10 BTC group. Or, a really lucky 0.01 group sharing 10 BTC. Smiley Set limits if you don't dare such cake. Smiley

  • If the cake is full (1 piece/wedge), the idea is this: With the bet, a user provides a number between the range specified. Then, the bets with the value closest to the result wins. Everything shared fairly. As there are some limits you can set on a cake, the sharing among winners can be interesting.

    However, I'm not sure how the BTC amount will affect how much that user will get. One idea was to change the "distance" from whatever you think the result will be to the result. However, this makes it so much easier to win if I say made the distance half if you bet double than others. What would be most fair? Obviously, if everybody bets the same amount, it's easier, as the amount won is purely based on the guessed result.

So, in my goal in making this fair I have a couple of questions for you guys.

Say we have 2 wedges/pieces, and the range is 0-360. To make it fair it will be like this:

Wedge 1 wins 0-180.
Wedge 2 wins 180-360.

Note though that 180 is shared. Now, since I'm using real numbers, odds for that happening is really really really really low. However, if it happens. Who wins? Wedge 1 or 2?


Same with 3 wedges.

Wedge 1 wins 0-120
Wedge 2 wins 120-240
Wedge 3 wins 240-360

Again, shared winnings. What do you guys say? Who wins at 120? At 240? Again, the chance of that happening is so low it's almost impossible, but still. I want to make it fair!


I'm also not totally sure what amount of BTC will do for the other idea, where you guess the result.

This is how it is currently. Imagine 5 users bets 0.1 BTC each. And we end up with this, sorted by shortest distance in percent (inverted as shorter should give most):

  Pot: 0.5

  User 1:  0.1*1.78 = 0.178 back in total.

  0.322 BTC left in pot.

  User 2: 0.1*1.62 = 0.162 back in total.

  0.16 BTC left in pot.

  User 3: 0.1*1.43 = 0.143 back in total.

  0.017 BTC left in pot.

  User 4: 0.1*1.40 = 0.140, but only 0.017 left so he/she gets all in pot.

  User 5: Gets nothing.

What do you guys think of this? I like this because many get more than initial bet. Note though that this is easy as all bets are the same. But what if user 5 bet 0.2 BTC? What would be most fair?
(Note that my fee isn't withdrawn here yet to make the calculations easier. I prefer doing this way first to make this correct. Then it's easy to just take the fee before doing those steps.)


So, what do you guys think of my project? Feel free to give me comments, suggestions.

Best Regards,
Chillance
BenAnh
Hero Member
*****
Offline Offline

Activity: 518
Merit: 500


View Profile
July 07, 2014, 10:40:03 AM
 #2

The simpler the better;)
Chillance (OP)
Sr. Member
****
Offline Offline

Activity: 310
Merit: 250


View Profile
July 07, 2014, 10:52:25 AM
Last edit: July 07, 2014, 11:23:00 AM by Chillance
 #3

What do you mean?

I'm asking here because maybe there are some math gurus here that can help me out making this fair. Smiley

For a single wedge (full cake), winnings are currently ONLY based on the guessed value (making a distance to cake's result), which is why I'm asking what the amount of BTC should affect. The thing is, you would be stupid to bet more, if it doesn't change how much you can win, right? So, that is why I'm wondering what would be fair. If I would bet 0.2 (double than others), and halfing the distance (my guess compared to the end result for cake), it will make it really easy to win. So, there must be a better way, no?

But I agree, I want it simple and fair!

Say the distanced halved. It would most likely be like this:

  Pot: 0.5

  User 5:  0.2*1.87 = 0.374 back in total.

  Pot: 0.126

  User 1:  0.1*1.78 = 0.178, but pot only has 0.126, so he/she takes the rest.

  User 2: Get's nothing.

  User 3: Get's nothing.

  User 4: Get's nothing.

That can't be fair.

So, maybe the bet shouldn’t affect the distance. But if you get your guess right, you can win more. Basically, increasing your bet only let's you take more of the pot IF you are close enough with your guessed value. How does that sound?
Chillance (OP)
Sr. Member
****
Offline Offline

Activity: 310
Merit: 250


View Profile
July 10, 2014, 08:47:08 AM
 #4

I was hoping for more feedback, but I assume it will be easier for you folks when it comes online. I'm currently working on the last pieces, testing bitcoin betting, sending and withdrawing... when this feels good enough, it will come online and I will make an announcement so you can test it out.

Some say you should "release often" and I get it. You release often, get feedback and work based on that. However, I also think you should give a good first impression...
Chillance (OP)
Sr. Member
****
Offline Offline

Activity: 310
Merit: 250


View Profile
July 17, 2014, 05:13:30 AM
Last edit: July 17, 2014, 07:22:56 PM by Chillance
 #5

Here is the latest progress. I've been testing a lot and even using testnet3 with "real" bitcoins, and it's really looking great. There are some UI things I'm not totally satisfied with, but I will wait fixing those issues. What's most important is getting the math right and bitcoins correctly send to people. Still, I couldn't help myself adding that pointer and numbers around the "cake" here. Smiley


Here I'm testing a "full cake"/1 wedge/piece, and as you can see, it's a quite interesting approach. It's even more fun with more bets, as basically, you can double up best case, if you guess the result exactly. And, there are several winners, sharing the whole pot until it's empty! All based on the result you guessed. And, the amount is based on how much you bet. I like this, as, sure, the runner up here looses some, but, not everything!

And next, I show the page that shows how the result value is calculated. Note that the order of user's salt is after the order of when bet was made.

Chillance (OP)
Sr. Member
****
Offline Offline

Activity: 310
Merit: 250


View Profile
July 23, 2014, 11:02:17 PM
 #6

I don't know why I keep working on this, as I don't really know if people will like it. Thing is though, I want to make it work great from start, because I want it to give a good first impression. I've been fixing a few things, and I really like how this turns out right now. Check this out:



And this is nice too:



Here you can track exactly what's going on with your BTC!

Which leads me into my current issue. I noticed that if I have 0.28 BTC to give to 6 users, it ends up like this:

+0.04666667
+0.04666667
+0.04666667
+0.04666667
+0.04666667
+0.04666667

However, note that this sums up to 0.28000002! Meaning it's more than in pot initially! I guess for now, when this happens, I will take from my earnings as it's not much. Just annoying, as it can slow down the payments.

Oh, and also, if only one person bets on a cake, and time runs out, I don't take any fee. Basically, the money is just returned.
Chillance (OP)
Sr. Member
****
Offline Offline

Activity: 310
Merit: 250


View Profile
August 18, 2014, 01:19:38 PM
 #7

Man, so many external issues its ridiculous. I want it to be easy, safe and intuitive. But man, there really is lacking a neat way getting live feedback with bitcoin transactions and blocks. Blockchain isn't making it easy, as you have to do several extra steps to make it work. And it's really annoying they don't have testnet support, so I can actually test for real with _their_ service with fake bitcoins. I've tested a lot locally though, using testnet.

I can use a local bitcoind, but I prefer using a service which provides more safety and automatic backups. Again, working on not loosing anyone’s bitcoins.

Now, is anyone here willing to test this out? Before I really announce this in "Service Announcements" or so. I'm even thinking pointing to testnet first as well.

I have done many tests myself with testnet and the PlayBTC's.

I have actually put in extra checks in case something isn't going as expected! Every bid has a boolean to tell me if everything is OK when it comes to payments. And, the whole cake has a boolean, that, if set to true, I KNOW everything is OK with it. Including payments. Because this boolean is set absolutely last, if that is false for some reason, and time is up for a cake, I know it's not ok, and can investigate further because I also put a lot of effort in keeping a history and messages about what's going on for a cake.

So, if you see this:


Everything is OK with that Cake!

Ok, so head over to www.btccake.com and tell me what you think. Note that this is not an official launch yet! I just need some feedback before I can make it official.

Thanks guys!
drporschef
Member
**
Offline Offline

Activity: 103
Merit: 10


View Profile
August 18, 2014, 07:06:46 PM
 #8

For something that claims to be a piece of cake it actually seems quite complex. I'd recommend offering giveaways for users to build up some momentum with the project.

Chillance (OP)
Sr. Member
****
Offline Offline

Activity: 310
Merit: 250


View Profile
August 19, 2014, 12:46:06 AM
 #9

For something that claims to be a piece of cake it actually seems quite complex. I'd recommend offering giveaways for users to build up some momentum with the project.
Yea? What do you find particularly complex? I guess the "Create New Cake" can be daunting at first, but really, all those values are necessary and more importantly, important. Note though that you really basically only need to set time range and then you could create a cake. But anyway, what do you find most confusing/complex?

I think I will do a giveaways actually. First people will get a sum of btc just for using it and giving me feedback.
williamj2543
Hero Member
*****
Offline Offline

Activity: 588
Merit: 500

Get ready for PrimeDice Sig Campaign!


View Profile WWW
August 19, 2014, 12:47:38 AM
 #10

This looks awesome. I would try it out if you had a website up and running. Layout looks very good.

█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████
▓▓▓▓▓  BIT-X.comvvvvvvvvvvvvvvi
→ CREATE ACCOUNT 
▓▓▓▓▓
█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████
Chillance (OP)
Sr. Member
****
Offline Offline

Activity: 310
Merit: 250


View Profile
August 19, 2014, 01:06:12 AM
 #11

This looks awesome. I would try it out if you had a website up and running. Layout looks very good.
Thanks! It's up right now at www.btccake.com actually. And if you happen to get a "not available" just refresh after a while, because you might be unlucky and trying just when I restart the server.

I can't stress enough that I want to test this out a bit first before people send bitcoins there like crazy. Smiley I've done many tests myself, but still. Could missed something. That is what you get when you can't really test with blockchain.info. Well, you can test with real bitcoins, but I don't understand why they don't have testnet3 support.

Feel free to play around with the fake money though. PlayBTC. I've actually set it to be able to reset to 10.0 BTC every week. This way it will have some value, as if you have more than 10 you are on the plus side. And, you can't just reset it if you just lost. I think I might have some nice prices for this later on. Smiley

Oh, and I need to get email in place. But you don't need that as long as you save your unique url. (which is http://www.btccake.com/user/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx)
Chillance (OP)
Sr. Member
****
Offline Offline

Activity: 310
Merit: 250


View Profile
August 19, 2014, 01:11:02 AM
 #12

Actually, I just created this: http://www.btccake.com/cake/f6e6eaa50e3bc52444f0079e0414fdfd0928631d7e8954ca6cde6167908c9d05 and placed a bet. Anyone wanna join or bet against me? Smiley It's PlayBTC, so not real money. But fun anyway. And you have 10 when you start.
RKZ72
Newbie
*
Offline Offline

Activity: 15
Merit: 0


View Profile
August 19, 2014, 02:52:02 AM
 #13

Sounds pretty good you should give away some mbtc though to get it rolling.
gordoh
Sr. Member
****
Offline Offline

Activity: 350
Merit: 250



View Profile
August 19, 2014, 08:09:06 AM
 #14

Okay I tried it. Bet on the first wedge. But to be honest, I have no idea what I'm betting on. Is it like a lottery where the winner is chosen at random. Sorry, Im sure you went through all of this already but its really not as simple as the title implies.  Huh


**Edit: Please know that I only have limited PC skills, no programming knowledge and I have no idea what Jquery is. So probably in the majority of people who will be using your site. (maybe your target audience??)
Chillance (OP)
Sr. Member
****
Offline Offline

Activity: 310
Merit: 250


View Profile
August 19, 2014, 09:41:32 AM
Last edit: August 19, 2014, 11:29:40 AM by Chillance
 #15

Okay I tried it. Bet on the first wedge. But to be honest, I have no idea what I'm betting on. Is it like a lottery where the winner is chosen at random. Sorry, Im sure you went through all of this already but its really not as simple as the title implies.  Huh


**Edit: Please know that I only have limited PC skills, no programming knowledge and I have no idea what Jquery is. So probably in the majority of people who will be using your site. (maybe your target audience??)

I love this feedback! Sounds to me like I should make a nice explanation page on there somewhere.

Basically, you bet on a wedge.

If the cake has 2 or more wedges, a wedge chance of winning is based on amount if bitcoins for that wedge.

The winning wedge is calculated based on input from a secret string concatenated with all users input, so its not really random, but quite impossible for anyone to know what it will be before hand. I really like that way because the result can always be calculated anytime by anyone (well, after the secret is revealed when time is up).

As for winnings, for example, the current cake has 0.3 PlayBTC on wedge 1. 0 on wedge 2. So, if time goes out, we just get our PlayBTC back because no one else bet against (basically Wedge 1 has 100% chance of winning Smiley )

Now, if someone put a bet on wedge 2 at, say 0.1 PlayBTC, that would be:

Wedge 1: 0.3 PlayBTC - 75% chance of winning
Wedge 2: 0.1 PlayBTC - 25% chance of winning

Also, the users in the winning wedge share the winnings based on bet too, so it's all fair.

Makes more sense now?
g-uid
Member
**
Offline Offline

Activity: 259
Merit: 18


View Profile
August 19, 2014, 02:44:25 PM
 #16

Looks great. Inspiring to see how much work you've put into this.
Chillance (OP)
Sr. Member
****
Offline Offline

Activity: 310
Merit: 250


View Profile
August 20, 2014, 01:06:59 AM
 #17

Looks great. Inspiring to see how much work you've put into this.
I'm really glad you say that because if you just knew much much time I put into this. Way too much if this fails. I hope it will be worth it though. Smiley That is why I'm taking it slow now and easing it in so it can be properly tested. With time this will be even better!

Btw, @gordoh check the cake now at http://www.btccake.com/cake/f6e6eaa50e3bc52444f0079e0414fdfd0928631d7e8954ca6cde6167908c9d05 and click the "Results" tab! There you have even more details. Might be too technical, but still.

Edit: And I just checked the database, and everybody got their PlayBTC back. So that works. Smiley What's great here is that PlayBTC and real bitcoins go pretty much the same path in the code, so if it works for PlayBTC, it works for real bitcoins too. For the code, it's the same thing.
gordoh
Sr. Member
****
Offline Offline

Activity: 350
Merit: 250



View Profile
August 20, 2014, 06:18:44 AM
 #18

I baked a new cake!!!  Grin

http://www.btccake.com/cake/99c44e59efad2ff9c96e77fcc56855671a4ef656d6b7acecbaeeeef398a22a16 Lets all have a slice of the Blue Doughnut  Cheesy

I am beginning to understand this now TBH, although I still have a few questions.

1. I see that wedge 2 and 3 are locked until a bet has been put on wedge 1. What if I want to bet on wedge 3 but nobody has bet on wedge 1 yet, then I am  forced to bet on wedge 1. Why is it like this?

2.What is the cake value range for?

3. If wedge 1 has 0.2BTC total bet on it, and wedge 2 has 0.4BTC total bet on it, does that mean that wedge 2 has double the chance of winning compared to wedge 1?


Chillance (OP)
Sr. Member
****
Offline Offline

Activity: 310
Merit: 250


View Profile
August 20, 2014, 07:11:11 AM
Last edit: August 20, 2014, 08:33:31 AM by Chillance
 #19

I baked a new cake!!!  Grin

http://www.btccake.com/cake/99c44e59efad2ff9c96e77fcc56855671a4ef656d6b7acecbaeeeef398a22a16 Lets all have a slice of the Blue Doughnut  Cheesy
Tastes good! Smiley Well, I bet on wedge 2 now, so one of us will win. Smiley Actually, if you loose I can give you extra PlayBTC just for playing along. Smiley Remember, if you have more than 10, you have more than you can get other ways. The button to get more only resets to 10 PlayBTC... Smiley


I am beginning to understand this now TBH, although I still have a few questions.

1. I see that wedge 2 and 3 are locked until a bet has been put on wedge 1. What if I want to bet on wedge 3 but nobody has bet on wedge 1 yet, then I am  forced to bet on wedge 1. Why is it like this?
Ah, yes, this is a design decision I had to make for the cake rendered there to show correct colors for the wedge. Basically so the buttons matches the wedge. And the needle would point to wrong wedge otherwise. Now, I could disable the order of able to bet on wedge, and everything would be calculated correctly. However, the colors wouldn't line up, and the result page would mix it up in different orders. So instead of neat and clean like this:

0-60
60-100
100-200
200-360

for example, it would be like:
100-200
60-100
200-360
0-60

Again, everything would be calculated correctly (I've tested this), but it wouldn't look as great. Besides, it doesn't really matter, unless you really like one particular color more than the other. Smiley Which reminds me that one of the additional features I would add later on would be to be able to select colors yourself (for the wedges).

But I might fix this "design flaw" later, and unlock betting on whatever wedge from start. For now I hope you can live with it. Smiley

2.What is the cake value range for?
There needs to be a range so we can decide who wins. But the range is arbitrary. The formula maps to whatever range, so it could be anything really. I just set limit between 0 and 1000 for, in case you have a number in there you like and I have to limit it to something. You can even have a range between 0 and 1, which is kinda funny. I have 0 to 360 as default, because, well, it makes sense for a circle. Smiley

The range is then mapped to the wedges depending on the amount of bitcoins compared to the other wedges. This so the more bitcoins than the others, the bigger range, and thus bigger chance of winning.

3. If wedge 1 has 0.2BTC total bet on it, and wedge 2 has 0.4BTC total bet on it, does that mean that wedge 2 has double the chance of winning compared to wedge 1?
That is correct. In that case it would be:
Wedge 1: 33.33%
Wedge 2: 66.67%

This basically means that wedge 2 will have double the range than wedge 1, but no grantee to win. Smiley
gordoh
Sr. Member
****
Offline Offline

Activity: 350
Merit: 250



View Profile
August 20, 2014, 11:25:25 AM
 #20

Okay I'm nearly there. now there's 1 more thing I don't understand.

What is salt for? Like I understand the explanation, it gets added to the formula to determine who the winner is, but the part that says "you are able to affect the result" I don't really understand.

You will be using a random string or putting your own string in but you wont actually know how you are going to affect the result.  So could I make the salt "H3LL0" ? Or is there a certain set of rules to follow when putting in a salt string?

I get what's its for though, it helps to keep the result random so that you cant affect who wins and who loses. (well, I guess that's what its for Huh )
Pages: [1] 2 3 4 5 6 7 »  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!