Pages:
Author

Topic: Intersango exchange (formerly Britcoin) - page 14. (Read 75372 times)

legendary
Activity: 2940
Merit: 1333
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
legendary
Activity: 1232
Merit: 1076
yep, it was done a little afterwards since phantom forgot to do it.
legendary
Activity: 2940
Merit: 1333
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.
legendary
Activity: 2940
Merit: 1333
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!
member
Activity: 107
Merit: 10
God are there some ridiculous orders..10000000 GBP wanted for 0.01 BTC....trolls be trollin.
legendary
Activity: 2940
Merit: 1333
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             );
legendary
Activity: 1232
Merit: 1076
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.
legendary
Activity: 2940
Merit: 1333
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).
newbie
Activity: 3
Merit: 0
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!
legendary
Activity: 1232
Merit: 1076
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)
legendary
Activity: 1232
Merit: 1076
Merged dooglus's gitorious branch after testing it today. Grin
legendary
Activity: 2940
Merit: 1333
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.
legendary
Activity: 1232
Merit: 1076
    ...
    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.
legendary
Activity: 2940
Merit: 1333
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.
member
Activity: 112
Merit: 10
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
legendary
Activity: 2940
Merit: 1333
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
member
Activity: 112
Merit: 10
Quick question...

I know it takes 3-5 working days for money to be deposited, but if it's deposited by cash directly into the account at a branch, does this speed up the process?

Thanks!

I deposited a few days ago using Nat West online banking into Britcoin's Lloyds TSB account and it took about 24 hours for the money to show up in my Britcoin account.

I can't imagine that using cash would make it much faster.  Also using cash you take a risk that the cashier might transcribe the reference code wrongly, and then there will be a delay while the guys at Britcoin try to match up the payment with your account.

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.
Still no sign of it yet. Yes that is a risk, but I was insistent with the cashier to ensure he inputed it correctly! I had the reference printed out for him to copy down etc... So fingers crossed nothing went wrong! The only reason I was wondering if it's faster is because cash instantly processes into the chosen bank account. There is no admin/ waiting period at all. But of course, if payments are getting manually authorised then it's not going to make much difference. Can't wait to buy some bitcoins!
legendary
Activity: 2940
Merit: 1333
Quick question...

I know it takes 3-5 working days for money to be deposited, but if it's deposited by cash directly into the account at a branch, does this speed up the process?

Thanks!

I deposited a few days ago using Nat West online banking into Britcoin's Lloyds TSB account and it took about 24 hours for the money to show up in my Britcoin account.

I can't imagine that using cash would make it much faster.  Also using cash you take a risk that the cashier might transcribe the reference code wrongly, and then there will be a delay while the guys at Britcoin try to match up the payment with your account.
member
Activity: 112
Merit: 10
Quick question...

I know it takes 3-5 working days for money to be deposited, but if it's deposited by cash directly into the account at a branch, does this speed up the process?

Thanks!
legendary
Activity: 2940
Merit: 1333
Thanks dooglus for your help. We sent you 10 BC for your help Grin

After some testing, we're going to pull that change.

Did you get my email dooglus?

Thanks a bunch.  Smiley

I did - and will reply right now.

Is there any kind of bug tracker for your exchange code?  If not, I think it would be good to have one.
Pages:
Jump to: