Bitcoin Forum
December 10, 2016, 06:56:28 PM *
News: To be able to use the next phase of the beta forum software, please ensure that your email address is correct/functional.
 
   Home   Help Search Donate Login Register  
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 [19] 20 21 22 23 24 25 26 27 28 29 30 31 32 »
  Print  
Author Topic: Intersango exchange (formerly Britcoin)  (Read 71224 times)
dooglus
Legendary
*
Offline Offline

Activity: 2002



View Profile
June 24, 2011, 10:37:28 PM
 #361

My intention was to use online banking but I left my stupid card reader thing at my other home!
This is why I'm such a big supporter of these bitcoins because regular payment methods are an absolute joke.

I quite like the card-reader thing.  Seems like a great solution to preventing fraud.  People can guess my password, but without my plastic card they can't transfer funds.  If MtGox had such a scheme in place they wouldn't have had the problems they're having.  (But they'd probably have different ones...)

Can't wait to buy some bitcoins!

I have a special limited edition bitcoin available for just 5000 GBP if you would like to buy it. Smiley

1481396188
Hero Member
*
Offline Offline

Posts: 1481396188

View Profile Personal Message (Offline)

Ignore
1481396188
Reply with quote  #2

1481396188
Report to moderator
1481396188
Hero Member
*
Offline Offline

Posts: 1481396188

View Profile Personal Message (Offline)

Ignore
1481396188
Reply with quote  #2

1481396188
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
BitMofo
Member
**
Offline Offline

Activity: 112


View Profile
June 24, 2011, 10:50:52 PM
 #362

I have a special limited edition bitcoin available for just 5000 GBP if you would like to buy it. Smiley

Sure sounds good! Monopoly money ok?  Cool

1HNffyHktcD2iB6WJhPxKbALJdg4dwerTG
dooglus
Legendary
*
Offline Offline

Activity: 2002



View Profile
June 24, 2011, 11:12:09 PM
 #363

I have a special limited edition bitcoin available for just 5000 GBP if you would like to buy it. Smiley

Sure sounds good! Monopoly money ok?  Cool

Whatever you can convince Britcoin to accept is fine with me.

genjix
Legendary
*
Offline Offline

Activity: 1232


View Profile
June 26, 2011, 01:42:30 AM
 #364

    ...
    Order 14: We are offering 10 GBP for 1 BC
    ...
    Order 18: They are offering 2.5 BC for 5 GBP
    ...

We need to calculate how much of our order will be chipped off, while
preserving their exchange rate.

    ...
    Order 14-1: We are offering 5 GBP for 2.5 BC
    Order 14-2: We are offering 5 GBP for 2.5 BC
    ...

We fulfill our order and close their order.

    ...
    Order 14-2: We are offering 5 GBP for 2.5 BC
    ...

A new transaction is created for record keeping purposes and the users funds are
updated accordingly.

I'm not sure this is a good way of doing it.

Suppose I'm trying to buy 1,000 BTC at 10 GBP each.  The sellers are wanting 12 GBP each at the moment, so no trade happens.  I'm waiting for a seller to ask for less.  Then some joker comes along and offers to sell 1 BTC for 1 GBP.  His offer matches my request to buy, and so, working the example as before:

    ...
    Order 14: We are offering 10,000 GBP for 1,000 BC
    ...
    Order 18: They are offering 1 BC for 1 GBP
    ...

We need to calculate how much of our order will be chipped off, while
preserving their exchange rate.

    ...
    Order 14-1: We are offering 1 GBP for 1 BC
    Order 14-2: We are offering 9,999 GBP for 9,999 BC
    ...

We fulfill our order and close their order.

    ...
    Order 14-2: We are offering 9,999 GBP for 9,999 BC
    ...

A new transaction is created for record keeping purposes and the users funds are
updated accordingly.

After buying the joker's 1 BTC for 1 GBP, the rest of out order is now changed, offering only 1 GBP per BTC.  Unless someone else comes along with a very cheap sale, our buy order will never get matched.  Even if some 2nd guy comes and offers 1 BTC for 2 GBP, we won't get to buy it, because we're now only offering 1 GBP per BTC.  What's the reasoning for changing the rate in "Order 14-2" above?  I think it should either keep the GBP spend and rate the same, and buy more BTC with the saving we made from the joker, so if the 2nd part is matched at the rate we requested we end up getting a total of 1,000.9 BTC for 10,000 GBP:

    ...
    Order 14-1: We are offering 1 GBP for 1 BC
    Order 14-2: We are offering 9,999 GBP for 999.9 BC
    ...

or keep the rate and BTC requested the same, and spend less GBP, so if the 2nd part is matched at the requested rate we end up getting 1,000 BTC for a total of 9991 GBP:

    ...
    Order 14-1: We are offering 1 GBP for 1 BC
    Order 14-2: We are offering 9,990 GBP for 999 BC
    ...

Did I misunderstand something?  Was the example I quoted wrong?  Or is the current implementation kind of weird?  Notice this is what happened to Caesium.  He offered to sell BTC at a low price when someone was already trying to buy at a higher price and the trade was carried out at his low price.

This is wrong since it uses the initial_amount and initial_want_amount to calculate the exchange rate you set. The amount left that you want is more for display purposes and isn't used internally.
dooglus
Legendary
*
Offline Offline

Activity: 2002



View Profile
June 26, 2011, 03:27:55 AM
 #365

This is wrong since it uses the initial_amount and initial_want_amount to calculate the exchange rate you set. The amount left that you want is more for display purposes and isn't used internally.

Yes, I see that now after reading the code.

I think you need to revise the example in the doc/process_order file:

Code:
    ...
    Order 14: We are offering 10 GBP for 1 BC
    ...
    Order 18: They are offering 2.5 BC for 5 GBP
    ...

We need to calculate how much of our order will be chipped off, while
preserving their exchange rate.

    ...
    Order 14-1: We are offering 5 GBP for 2.5 BC
    Order 14-2: We are offering 5 GBP for 2.5 BC
    ...

We fulfill our order and close their order.

    ...
    Order 14-2: We are offering 5 GBP for 2.5 BC
    ...


The order 14-2 isn't right, and makes it look like the whole of our order is adjusted to match the incoming order's rate.

What really happens is:

Code:
    ...
    Order 14-1: We are offering 5 GBP for 2.5 BC
    Order 14-2: We are offering 5 GBP for -1.5 BC
    ...

and since our want_amount is now negative, our order is closed too.  We don't get to spend the other 5 GBP that we asked to spend on bitcoins because we already got more than the 1 BC we initially requested.  We'll have to make a new request and hope that that time it all gets spent.

genjix
Legendary
*
Offline Offline

Activity: 1232


View Profile
June 26, 2011, 01:08:15 PM
 #366

Merged dooglus's gitorious branch after testing it today. Grin
genjix
Legendary
*
Offline Offline

Activity: 1232


View Profile
June 26, 2011, 01:13:08 PM
 #367

What really happens is:

Code:
   ...
    Order 14-1: We are offering 5 GBP for 2.5 BC
    Order 14-2: We are offering 5 GBP for -1.5 BC
    ...

and since our want_amount is now negative, our order is closed too.  We don't get to spend the other 5 GBP that we asked to spend on bitcoins because we already got more than the 1 BC we initially requested.  We'll have to make a new request and hope that that time it all gets spent.

Ahh, I meant to actually say 0.5 instead of 2.5... But your reasoning is valid and correct. I updated the document in the repo :p (although it's no longer true since you fixed it)
BTC1472
Newbie
*
Offline Offline

Activity: 3


View Profile
June 26, 2011, 05:40:23 PM
 #368

BTW is anyone in London and want to meet up later? We might get a pizza or something with a few other community members.

I'm in London, and just bought my first handful of BTC of Britcoin. Would very much like to meet up and discuss techie stuff around BTC (I'm a newbie to bitcoin though, otherwise fairly experienced developer).

PM if you're interested!
dooglus
Legendary
*
Offline Offline

Activity: 2002



View Profile
June 26, 2011, 06:40:08 PM
 #369

We don't get to spend the other 5 GBP that we asked to spend on bitcoins because we already got more than the 1 BC we initially requested.  We'll have to make a new request and hope that that time it all gets spent.

Ahh, I meant to actually say 0.5 instead of 2.5... But your reasoning is valid and correct. I updated the document in the repo :p (although it's no longer true since you fixed it)

I think it would be best to just ignore both the want_amount values other than for determining the initial price, and only use the (have) amount values.  If I have 10 GBP that I want to convert to BTC, I want to convert all 10.  If you come at me with a better price than I was expecting, I want to end up with bonus bitcoins, not left over GBP.  I've not fixed that bit (yet).

genjix
Legendary
*
Offline Offline

Activity: 1232


View Profile
June 26, 2011, 07:58:18 PM
 #370

You're right, we do ignore the want field. It's mostly left for display and is kind of redundant. It's not even needed.
dooglus
Legendary
*
Offline Offline

Activity: 2002



View Profile
June 26, 2011, 08:57:14 PM
 #371

You're right, we do ignore the want field. It's mostly left for display and is kind of redundant. It's not even needed.

I think that's not the case.  You're closing orders when want_amount <= 0.

See https://gitorious.org/intersango/intersango/blobs/master/cron/process_orders.php#line36 for example:

Code:
38     UPDATE orderbook
39     SET
40         status='CLOSED'
41     WHERE
42         orderid='$them_orderid'
43         AND (
44             amount <= 0
45             OR want_amount <= 0
46             );

saadtariq30
Member
**
Offline Offline

Activity: 107


View Profile
June 27, 2011, 01:16:07 AM
 #372

God are there some ridiculous orders..10000000 GBP wanted for 0.01 BTC....trolls be trollin.
dooglus
Legendary
*
Offline Offline

Activity: 2002



View Profile
June 27, 2011, 02:41:13 AM
 #373

God are there some ridiculous orders..10000000 GBP wanted for 0.01 BTC....trolls be trollin.

My bad...

Can't blame me for trying tho' can you?

edit: oh, that's not me.  I'm offering 1 bitcoin for 5k, 50k, 500k, and 5 million GBP.  But someone has 1-up'ed me.  How rude!

dooglus
Legendary
*
Offline Offline

Activity: 2002



View Profile
June 27, 2011, 03:16:23 AM
 #374

I updated the document in the repo :p (although it's no longer true since you fixed it)

Did you put my fixes live?

It looks like you didn't (times are PST):

Code:
Sun Jun 26 14:39:01 2011  10.130500   0.010887
Sun Jun 26 14:40:01 2011  10.149700   5.891817
Sun Jun 26 14:41:01 2011  12.220000   0.008183
Sun Jun 26 14:45:01 2011  10.153800   0.650000
Sun Jun 26 14:46:01 2011  10.240200   2.080043

That 12.2 in the middle there shouldn't have happened if you had applied my patch, given that you have people offering to sell at 8 different 11.x prices.

genjix
Legendary
*
Offline Offline

Activity: 1232


View Profile
June 27, 2011, 11:45:06 AM
 #375

yep, it was done a little afterwards since phantom forgot to do it.
dooglus
Legendary
*
Offline Offline

Activity: 2002



View Profile
June 28, 2011, 07:09:44 PM
 #376

yep, it was done a little afterwards since phantom forgot to do it.

I was just watching the Britcoin market and saw a trade come in and get matched at the pre-existing market price, so my patch seems to be working:

Market depth before the new order arrived:

Code:
      11.000000        1.820000 :       10.761600        0.251498
      11.000000        0.012811 :       10.909100        0.578283
      10.994600        1.850000 :       10.989000        1.001001
           sell                               buy               

A buy order came in at 11.5, well over the best existing sell price.  Previously this would have been matched at 11.5:

Code:
              :       10.761600        0.251498
      11.000000        1.820000 :       10.909100        0.578283
      11.000000        0.012811 :       10.989000        1.001001
      10.994600        1.850000 :       11.563300        0.500000
           sell                               buy               

After the trade was done, the best sell offer has been reduced by 0.5BTC:

Code:
      11.000000        1.820000 :       10.761600        0.251498
      11.000000        0.012811 :       10.909100        0.578283
      10.994600        1.324137 :       10.989000        1.001001
           sell                               buy               

and the trade went through at 10.9946, for 0.525863 BTC:

Code:
Tue Jun 28 11:56:01 2011  10.994600   0.525863

The size of the order in GBP was kept the same.  Since he got a better price than he asked for, he got correspondingly more BTC:

Code:
>>> 10.994600 * 0.525863
5.7816533398
>>> 11.563300 * 0.500000
5.78165

genjix
Legendary
*
Offline Offline

Activity: 1232


View Profile
June 29, 2011, 02:57:14 PM
 #377

We were under-reporting our volume to bitcoinwatch/charts Grin

Thanks to dooglus, we fixed a bug where our trades were dropping 0s on the end in our volume.

New exchange is coming along nicely. We will be in a feature lock-down soon and start a week long bug fixing mode.
ribuck
Donator
Legendary
*
Offline Offline

Activity: 826


View Profile
June 29, 2011, 03:41:48 PM
 #378

Thanks dooglus, your patch was an important improvement.
koopa
Member
**
Offline Offline

Activity: 61



View Profile
June 30, 2011, 02:37:18 PM
 #379

We were under-reporting our volume to bitcoinwatch/charts Grin

Thanks to dooglus, we fixed a bug where our trades were dropping 0s on the end in our volume.

New exchange is coming along nicely. We will be in a feature lock-down soon and start a week long bug fixing mode.

Hi genjix,

Have you entered bug fixing mode yet? The reason I ask is because i am currently seeing PHP errors all over your website. I was about to make my first BTC deposit.

Thanks,

Matt

Grin
dooglus
Legendary
*
Offline Offline

Activity: 2002



View Profile
June 30, 2011, 05:07:41 PM
 #380

Have you entered bug fixing mode yet? The reason I ask is because i am currently seeing PHP errors all over your website. I was about to make my first BTC deposit.

I don't believe they have.

Can you show the errors you're getting, and/or tell us how to see them for ourselves?  I've not noticed the errors.

Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 [19] 20 21 22 23 24 25 26 27 28 29 30 31 32 »
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!