Author

Topic: mtgox fee calculations not accurate. (Read 1814 times)

newbie
Activity: 59
Merit: 0
June 26, 2011, 12:48:25 PM
#18
Rounding is a major concern on just about anything that does a significant amount of calculation.. It wouldn't be surprising at all if mtgox got that bit wrong... compared to some of the other stuff I wouldn't even consider that an issue right now.  OTOH from the initial 1BTC example it looks right (0.0065 rounds to 0.006 using bankers rounding).

btw. you never compare floats for equality.. you compare within a tolerance, or don't use float.  I'm not sure why mtgox would need to be comparing floats anyway.. mostly they're showing the results of simple calculations.

That 0.2222 error.. I've made that kind of mistake myself by rounding too early.. it happens.  It'll probably be fixed by the code rewrite and if it isn't then's the time to point it out, not now.

member
Activity: 75
Merit: 10
June 26, 2011, 12:25:02 PM
#17
mtgox fees appear to be inaccurate.   I thought they charged 0.65%

Here is an example:

bought 2 BTC -  fee charged: 0.01300000 ฿TC
bought 1 BTC -  fee charged: 0.00600000 ฿TC   

They undercharged me on the 1BTC trade. (should have been 0.00650000  ฿TC)

I also saw some undercharging on USD values when selling.

So far these minor miscalulations work in the users favour - so I guess nobody is really complaining - but have mtgox said anything about this?
If they're not accurate in charging these fees.. what else are they not accurate in calculating?



Didn't they drop the fees for the next month due to the website compromise?
newbie
Activity: 42
Merit: 0
June 26, 2011, 12:14:41 PM
#16
Yup, check my signature.

This makes it all the more embarrassing for you.
qed
full member
Activity: 196
Merit: 100
June 26, 2011, 05:50:38 AM
#15

You should give up. Making comments about programming when you clearly don't have a clue is bound to be embarrassing for you.


Yup, check my signature.
newbie
Activity: 42
Merit: 0
June 25, 2011, 09:02:13 AM
#14
Anyway you are wrong and it seems you cant see it. I give up.

+1, Funny!

It's actually very, very easy to get maths wrong on computers, that's why there's fields of study and university courses about it. If it was simple, this would not be needed.
member
Activity: 98
Merit: 10
June 25, 2011, 08:52:20 AM
#13
What's that, bash scripting? Which language uses $ in front of a variable? Anyway you are wrong and it seems you cant see it. I give up.

PHP uses $.

Any floating-point calculation can easily be not exact. That's why floats and doubles should be avoided when working with financial data.
legendary
Activity: 1092
Merit: 1001
June 25, 2011, 08:52:08 AM
#12
When MtGox comes back up, it will have an entirely new backend.  The old backend was built by the previous owner and MagicalTux has beeem working on a rewrite since right after he purchased the site.  Discussing an issue with the previous backend us pointless at this point.  Wait until it is back up and then check.  If it's still an issue, open a ticket and let us know.

That's good to hear.  It was just a point of concern..  and I understand if it's not a priority just now.

legendary
Activity: 1092
Merit: 1001
June 25, 2011, 08:50:52 AM
#11
What's that, bash scripting? Which language uses $ in front of a variable?
perl, tcl, php.. 
The language is irrelevant.

Anyway you are wrong and it seems you cant see it. I give up.

You should give up. Making comments about programming when you clearly don't have a clue is bound to be embarrassing for you.
full member
Activity: 182
Merit: 100
June 25, 2011, 08:41:47 AM
#10
When MtGox comes back up, it will have an entirely new backend.  The old backend was built by the previous owner and MagicalTux has beeem working on a rewrite since right after he purchased the site.  Discussing an issue with the previous backend us pointless at this point.  Wait until it is back up and then check.  If it's still an issue, open a ticket and let us know.
qed
full member
Activity: 196
Merit: 100
June 25, 2011, 08:31:35 AM
#9
Who told you the exchange rate was exactly $17.29 and has not been rounded?

The logs show it as $17.29000 - and I'm fairly sure I asked for the trade to occur at 17.29!
It is simply not legitimate to show it with this many decimal places if it was rounded off at 2DP.



Quote
It's very hard to mess up an easy task like multiplying 2 numbers when you program.

No. This is the problem with amateur programmers who try to code with currency.
It is *very easy* to get apparently simple things wrong.

e.g 0.1 * 21.55
depending on the precision used could come out as say 2.1550000000000002

now store that in a variable $x 
check if you have the expected value  $x == 2.155   and the program returns FALSE.
In this example, I've used floats - just to demonstrate one pitfall.

Rounding during intermediate calculations is another way to introduce inaccuracies and it looks to me as though this is what mt gox is doing.


What's that, bash scripting? Which language uses $ in front of a variable? Anyway you are wrong and it seems you cant see it. I give up.
legendary
Activity: 1092
Merit: 1001
June 25, 2011, 04:36:49 AM
#8
Who told you the exchange rate was exactly $17.29 and has not been rounded?

The logs show it as $17.29000 - and I'm fairly sure I asked for the trade to occur at 17.29!
It is simply not legitimate to show it with this many decimal places if it was rounded off at 2DP.



Quote
It's very hard to mess up an easy task like multiplying 2 numbers when you program.

No. This is the problem with amateur programmers who try to code with currency.
It is *very easy* to get apparently simple things wrong.

e.g 0.1 * 21.55
depending on the precision used could come out as say 2.1550000000000002

now store that in a variable $x 
check if you have the expected value  $x == 2.155   and the program returns FALSE.
In this example, I've used floats - just to demonstrate one pitfall.

Rounding during intermediate calculations is another way to introduce inaccuracies and it looks to me as though this is what mt gox is doing.









qed
full member
Activity: 196
Merit: 100
June 25, 2011, 04:12:09 AM
#7

It's just rounded. Shown value is different form the actual value.

the 2nd is 0.0065 and the 1st is 0.013.

What evidence do you have for that?


Look at this USD fee:
 1.98000000 ฿TC at $17.29000 (fee)   $0.22220

By my calculations, at 0.65% - the fee should be $0.22252230

If they're rounding - it's not at a consistent number of DP for BTC compared to USD... and how the hell did they come up with 0.22220 anyway??

What makes you think it's a rounding for *display* and not a rounding of the underlying value?
Does/did mtgox have a displayed policy on how they round anyway?


Who told you the exchange rate was exactly $17.29 and has not been rounded? It's very hard to mess up an easy task like multiplying 2 numbers when you program.
legendary
Activity: 1092
Merit: 1001
June 25, 2011, 01:42:56 AM
#6

This is surely a big no-no.  This is as bad as using floats for currency.
Doesn't anyone else have concerns about this?Huh

I do. But I think the best course would be to let them handle the current, more pressing issues... once the site is back up and things are returning to normal, and MagicalTux actually gets to have a full night's sleep, then see if you can open a ticket with them about it.

I agree... it's not something I want to hassle them about right now.. but I do think it warrants discussion and should be public knowledge.
member
Activity: 112
Merit: 10
June 25, 2011, 01:40:53 AM
#5
Quote
1.98000000 ฿TC at $17.29000 (fee)   $0.22220

By my calculations, at 0.65% - the fee should be $0.22252230

If they're rounding - it's not at a consistent number of DP for BTC compared to USD... and how the hell did they come up with 0.22220 anyway??
The only way I could come up with something close to 0.2222  - was to round during the intermediate calculation.

This is surely a big no-no.  This is as bad as using floats for currency.
Doesn't anyone else have concerns about this?Huh

I do. But I think the best course would be to let them handle the current, more pressing issues... once the site is back up and things are returning to normal, and MagicalTux actually gets to have a full night's sleep, then see if you can open a ticket with them about it.
legendary
Activity: 1092
Merit: 1001
June 25, 2011, 01:38:02 AM
#4
Quote
1.98000000 ฿TC at $17.29000 (fee)   $0.22220

By my calculations, at 0.65% - the fee should be $0.22252230

If they're rounding - it's not at a consistent number of DP for BTC compared to USD... and how the hell did they come up with 0.22220 anyway??

The only way I could come up with something close to 0.2222  - was to round during the intermediate calculation.

This is surely a big no-no.  This is as bad as using floats for currency.
Doesn't anyone else have concerns about this?Huh

legendary
Activity: 1092
Merit: 1001
June 25, 2011, 01:34:35 AM
#3

It's just rounded. Shown value is different form the actual value.

the 2nd is 0.0065 and the 1st is 0.013.

What evidence do you have for that?


Look at this USD fee:
 1.98000000 ฿TC at $17.29000 (fee)   $0.22220

By my calculations, at 0.65% - the fee should be $0.22252230

If they're rounding - it's not at a consistent number of DP for BTC compared to USD... and how the hell did they come up with 0.22220 anyway??

What makes you think it's a rounding for *display* and not a rounding of the underlying value?
Does/did mtgox have a displayed policy on how they round anyway?





qed
full member
Activity: 196
Merit: 100
June 25, 2011, 01:21:08 AM
#2
mtgox fees appear to be inaccurate.   I thought they charged 0.65%

Here is an example:

bought 2 BTC -  fee charged: 0.01300000 ฿TC
bought 1 BTC -  fee charged: 0.00600000 ฿TC   

They undercharged me on the 1BTC trade. (should have been 0.00650000  ฿TC)

I also saw some undercharging on USD values when selling.

So far these minor miscalulations work in the users favour - so I guess nobody is really complaining - but have mtgox said anything about this?
If they're not accurate in charging these fees.. what else are they not accurate in calculating?



It's just rounded. Shown value is different form the actual value.

the 2nd is 0.0065 and the 1st is 0.013.
legendary
Activity: 1092
Merit: 1001
June 25, 2011, 12:49:40 AM
#1
mtgox fees appear to be inaccurate.   I thought they charged 0.65%

Here is an example:

bought 2 BTC -  fee charged: 0.01300000 ฿TC
bought 1 BTC -  fee charged: 0.00600000 ฿TC   

They undercharged me on the 1BTC trade. (should have been 0.00650000  ฿TC)

I also saw some undercharging on USD values when selling.

So far these minor miscalulations work in the users favour - so I guess nobody is really complaining - but have mtgox said anything about this?
If they're not accurate in charging these fees.. what else are they not accurate in calculating?

Jump to: