Bitcoin Forum
June 29, 2024, 07:09:13 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 ... 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 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 [54] 55 56 57 58 59 60 61 62 63 64 65 »
  Print  
Author Topic: 300 BTC Coding Contest: Distributed Exchange (MasterCoin Developer Thread)  (Read 129144 times)
This is a self-moderated topic. If you do not want to be moderated by the person who started this topic, create a new topic.
zathras
Sr. Member
****
Offline Offline

Activity: 266
Merit: 250



View Profile
March 01, 2014, 04:34:15 AM
 #1061

Yeah, 0 required fee is fine. It's up to the seller. The only need for the fee is when somebody is trying to attack the system with spam to gum up the works, so at times when things are flowing smoothly the minimum fee might not even be needed.
Perfect - thanks for addressing so quickly.  I'll modify the state engines for DEx to allow zero fees.

Graz,
How can I see the test msc transactions?  I tried
https://masterchain.info/Address.html?addr=1EqTta1Rt8ixAA32DuC29oukbsSWU62qAV

But only msc is listed

As Dexx mentioned, append &currency=TMSC (case sensitive from what I've found).  Couldn't find a way to work it through the UI.

Thanks Smiley
Zathras

Smart Property & Distributed Exchange: Master Protocol for Bitcoin
zathras
Sr. Member
****
Offline Offline

Activity: 266
Merit: 250



View Profile
March 01, 2014, 05:21:53 AM
 #1062

For address 1GtTPepFqS8MWZzFKsE62bNowY2LZos8Lq, in transaction 36f191348998adb993a4d2e4041a0aeb2cc108521d1a48a04c484baa9a1d3216 this is not a rounding error - from my understanding the coins bought value is 0.01088890 rather than the 0.01088888 you guys have.

Coins bought is based on bitcoin payment even if over the originally accepted amount, as long as those extra coins are available (and they were in this case).  This bitcoin payment was for 0.0021777 BTC, multiplied by the unit price of 0.2 gives us 0.01088890.

Hope that makes sense Smiley



Smart Property & Distributed Exchange: Master Protocol for Bitcoin
Bitoy
Sr. Member
****
Offline Offline

Activity: 449
Merit: 250


View Profile
March 01, 2014, 09:13:03 AM
Last edit: March 01, 2014, 10:02:11 AM by Bitoy
 #1063

https://blockchain.info/tx/0b77033abe7d9c2c06120d5fbd3708bba4a8da39989c9431704c9fd95412d97a

The amount sent is 0.00217778.   You missed the last digit.

Edit

I should have paid  0.0002177776. But since max is 8 digit. It (my wallet) rounded off to 0.000217778.

If Someone overpaid.   Should we

credit the overpayment
cancel over payment

For me I'm leaning towards canceling since I really wanted to buy only 0.0188888.  It's just that I can't pay the exact amount because of the rounding limit Smiley

But the spec says

You must send the appropriate amount of bitcoins before the time limit expires to complete the purchase. Note that you must send the bitcoins from the same address which initiated the purchase. If you send less than the correct amount of bitcoins, your purchase will be adjusted downwards. The remaining coins will be added back to those available in the Sell Offer if it’s still active. If you send more than the correct amount of bitcoins and the Sell Offer has more coins still available your order will be adjusted upwards.

So I'll follow the specs.   Adjusted upwards because the seller has more coins to sell.

0.01088890

For address 1GtTPepFqS8MWZzFKsE62bNowY2LZos8Lq, in transaction 36f191348998adb993a4d2e4041a0aeb2cc108521d1a48a04c484baa9a1d3216 this is not a rounding error - from my understanding the coins bought value is 0.01088890 rather than the 0.01088888 you guys have.

Coins bought is based on bitcoin payment even if over the originally accepted amount, as long as those extra coins are available (and they were in this case).  This bitcoin payment was for 0.0021777 BTC, multiplied by the unit price of 0.2 gives us 0.01088890.

Hope that makes sense Smiley



Bitoy
Sr. Member
****
Offline Offline

Activity: 449
Merit: 250


View Profile
March 01, 2014, 03:34:19 PM
Last edit: March 01, 2014, 04:10:06 PM by Bitoy
 #1064

After adding the overpayment fix, reparsing my test server.   I got the following differences

Getting shorter =)

MM=4.11111112 1BKpa19m5Xy9SvSzC5djPWtCfbuynSDwmb MCHAIN=6.12345
MM=37.00681057 1EqTta1Rt8ixAA32DuC29oukbsSWU62qAV MCHAIN=35.37455
MM=1 1QFWodNASZv8KRHnhypKaMys5CGRg7GrFQ MCHAIN=0
MM=4.0108889 1GtTPepFqS8MWZzFKsE62bNowY2LZos8Lq MCHAIN=4.01088888
MM=0.70458333 17RVTF3vJzsuaGh7a94DFkg4msJ7FcBYgX MCHAIN=0.700111

Comparison Completed
MM=4.11111112 1BKpa19m5Xy9SvSzC5djPWtCfbuynSDwmb MCHEST=30.91534621
MM=37.00681057 1EqTta1Rt8ixAA32DuC29oukbsSWU62qAV MCHEST=49.12022221
MM=0.082 1G3P5bws8wRVrVfKWxv8F85pRjs9qXyyA6 MCHEST=0.08199999
MM=0.09886999 1DYb5Njvcgovt9gUMdMgYkpaQjAEdUooon MCHEST=0.09887


Will try to check each one tomorrow.
Bitoy
Sr. Member
****
Offline Offline

Activity: 449
Merit: 250


View Profile
March 01, 2014, 04:01:54 PM
 #1065

Looks like a valid sell offer
6784b73048de3ab36c08ee06897be92ccb20f9b288345f96b0681cbc5b014ad4

Invalid in Masterchest
Invalid Masterchain
https://masterchain.info/selloffer.html?tx=6784b73048de3ab36c08ee06897be92ccb20f9b288345f96b0681cbc5b014ad4&currency=MSC


grazcoin
Sr. Member
****
Offline Offline

Activity: 284
Merit: 250



View Profile
March 01, 2014, 06:30:47 PM
 #1066

For address 1GtTPepFqS8MWZzFKsE62bNowY2LZos8Lq, in transaction 36f191348998adb993a4d2e4041a0aeb2cc108521d1a48a04c484baa9a1d3216 this is not a rounding error - from my understanding the coins bought value is 0.01088890 rather than the 0.01088888 you guys have.

Coins bought is based on bitcoin payment even if over the originally accepted amount, as long as those extra coins are available (and they were in this case).  This bitcoin payment was for 0.0021777 BTC, multiplied by the unit price of 0.2 gives us 0.01088890.

Hope that makes sense Smiley


Zathras,

It seems J.R. agreed with me that we should disable this feature of over payment.

Repeating J.R. on the mailing list:

The over-payment logic has been there from the beginning (it's not new),
and is another annoyance which only affects BTC/MSC exchange (can't overpay
when buying GoldCoin with MSC, for instance). I figured if the buyer
overpaid and there were still coins for sale, why not give them to the
buyer? But, now I see why not.

Grazcoin, you make a very convincing set of arguments that we should not
count overpayments, especially in regards to complexity, which we all hate.
Bitoy and Zathras, can you guys confirm that "All implementations currently
work with the assumption that over payment is simply a buyer's mistake and
gives him no benefits."?

Assuming that is true, I'll just go update the spec to disable
over-payments entirely. It's obviously not core to what we are doing, and
we might as well make things simpler.

Simplicity is our biggest advantage over our alt-chain competitors, and
this is a small opportunity to increase our lead in that area.

If you guys ARE handling over-payments currently, I hope it is not too
difficult to simply disable that code?

Thanks!

-J.R.



On Fri, Feb 28, 2014 at 11:57 PM, <
BM-2cXwikMGURpFu1s9SB2qpzGCVA7fzjPqSy@bitmessage.ch> wrote:

> I suggest to change the spec that over payments do not increase the amount
> purchased for the following reasons:
>
> If a user sees that the updated (more expensive) offer got already
> accepted, he could snap the offer by overpaying.
>
> The reserved amount kept on the address after an update must include then
> the whole previous sell offer at least until all accepts to original offer
> expire.
>
> The complexity is one magnitude higher, and the gain is some doubted
> feature/behaviour that users would not expect, and suspect that it is a
> bug, as it exists no where in the finance world.
>
> The sell offer update with 2 versions feature introduced enough complexity
> which still prevents us from consensus, so please do not add any more. We
> may have to postpone the 15.3.
>
> All implementations currently work with the assumption that over payment
> is simply a buyer's mistake and gives him no benefits.
>
> Grazcoin



But:
For the tx you mention, I don't think it got over paid.

The accept:
https://masterchain.info/sellaccept.html?tx=36f191348998adb993a4d2e4041a0aeb2cc108521d1a48a04c484baa9a1d3216&currency=TMSC
The sell offer:
https://masterchain.info/selloffer.html?tx=effcb1a90f15b39ef2295d8b1d5b3fa5c4a156936b5cfcb770ca68ac1e7ace0e&currency=TMSC
The payment:
https://masterchain.info/btcpayment.html?tx=0b77033abe7d9c2c06120d5fbd3708bba4a8da39989c9431704c9fd95412d97a&currency=TMSC
or on blockchain:
https://blockchain.info/tx/0b77033abe7d9c2c06120d5fbd3708bba4a8da39989c9431704c9fd95412d97a

Amount accepted 0.01088888
Price per coin    0.2 ฿/TMSC
payment expected = 0.01088888*0.2=0.002177776 rounding to 8 decimal digits 0.00217778
actual payment is exactly 0.00217778 to 1BKpa19m5Xy9SvSzC5djPWtCfbuynSDwmb




grazcoin
Sr. Member
****
Offline Offline

Activity: 284
Merit: 250



View Profile
March 01, 2014, 06:36:38 PM
 #1067

Looks like a valid sell offer
6784b73048de3ab36c08ee06897be92ccb20f9b288345f96b0681cbc5b014ad4

Invalid in Masterchest
Invalid Masterchain
https://masterchain.info/selloffer.html?tx=6784b73048de3ab36c08ee06897be92ccb20f9b288345f96b0681cbc5b014ad4&currency=MSC


The reason for invalidation is on the masterchain.info link you supplied, and it says:
new zero sell offer (was 50.0).

It means that at the time of the sell offer creation, there was a zero balance which means causes a zero sell offer.
Zero amount sell offers are invalid.


zathras
Sr. Member
****
Offline Offline

Activity: 266
Merit: 250



View Profile
March 01, 2014, 07:51:10 PM
 #1068

Thanks guys Smiley

On the overpayments - seems we're both correct - yet another reason to avoid overpayments (technically that same bitcoin payment could be for an MSC value of 0.01088888 to 0.01088892 - all round to requiring a bitcoin payment of 0.00217778).  I've replied on the dev list but TL:DR I've added my support for removing overpayment support entirely.


Smart Property & Distributed Exchange: Master Protocol for Bitcoin
zathras
Sr. Member
****
Offline Offline

Activity: 266
Merit: 250



View Profile
March 01, 2014, 07:55:55 PM
 #1069

Bitoy,

This one's bugging me in the real MSC consensus check, your data is correct but any chance you can avoid using E numbers/notation? It makes my consensus system think there is a mismatch.

Code:
Address	                                MyMastercoins	        Masterchain	   MastercoinExplorer	    Masterchest
1Btf1fzDsf4HtFeNMjcfwDzCygahfkoq21 3E-08           0.00000003                      0.00000003

Thanks Smiley

Smart Property & Distributed Exchange: Master Protocol for Bitcoin
Bitoy
Sr. Member
****
Offline Offline

Activity: 449
Merit: 250


View Profile
March 02, 2014, 11:07:15 AM
 #1070

Zathras your the sell offer below in masterchest is invalid.

03597f0bc804ecc355b2c4344cd1526c51209f9e3efa6d62192ec4dd923755e6

I think it is valid because if a seller sells more than his number of coins it is assumed he is selling all of it.


Ps.  Will fix the consensus E number notations.
Bitoy
Sr. Member
****
Offline Offline

Activity: 449
Merit: 250


View Profile
March 02, 2014, 04:09:10 PM
 #1071

After removing the overpayment option (in the Test server):

Only 3 Differences with MasterChain

MM=38.88135379 1EqTta1Rt8ixAA32DuC29oukbsSWU62qAV MCHAIN=45.498
MM=2.2345679 1BKpa19m5Xy9SvSzC5djPWtCfbuynSDwmb MCHAIN=3.00124938
MM=536.90527669 13NRX88EZbS5q81x6XFrTECzrciPREo821 MCHAIN=526.90527669


Only 6 Differences with MasterChest
Note 3 are almost the same only .00000001 difference

MM=38.88135379 1EqTta1Rt8ixAA32DuC29oukbsSWU62qAV MCHEST=49.12022221
MM=2.2345679 1BKpa19m5Xy9SvSzC5djPWtCfbuynSDwmb MCHEST=30.91534621
MM=0.700111 17RVTF3vJzsuaGh7a94DFkg4msJ7FcBYgX MCHEST=0.70458333
MM=4.01088888 1GtTPepFqS8MWZzFKsE62bNowY2LZos8Lq MCHEST=4.0108889
MM=0.09886999 1DYb5Njvcgovt9gUMdMgYkpaQjAEdUooon MCHEST=0.09887
MM=0.082 1G3P5bws8wRVrVfKWxv8F85pRjs9qXyyA6 MCHEST=0.08199999

Bitoy
Sr. Member
****
Offline Offline

Activity: 449
Merit: 250


View Profile
March 02, 2014, 04:20:01 PM
 #1072

Bitoy,

This one's bugging me in the real MSC consensus check, your data is correct but any chance you can avoid using E numbers/notation? It makes my consensus system think there is a mismatch.

Code:
Address	                                MyMastercoins	        Masterchain	   MastercoinExplorer	    Masterchest
1Btf1fzDsf4HtFeNMjcfwDzCygahfkoq21 3E-08           0.00000003                      0.00000003

Thanks Smiley


I've update jaddress.aspx but the consensus still sees 3E-08.
grazcoin
Sr. Member
****
Offline Offline

Activity: 284
Merit: 250



View Profile
March 02, 2014, 05:37:05 PM
 #1073

After removing the overpayment option (in the Test server):

Bitoy,
When will the fix get to the main server?
Can you give the address of the test server?

I want to see what differences between us are left after that fix:
https://masterchain.info/general/TMSC-difference.txt


zathras
Sr. Member
****
Offline Offline

Activity: 266
Merit: 250



View Profile
March 02, 2014, 07:24:42 PM
 #1074

Bitoy,

This one's bugging me in the real MSC consensus check, your data is correct but any chance you can avoid using E numbers/notation? It makes my consensus system think there is a mismatch.

Code:
Address	                                MyMastercoins	        Masterchain	   MastercoinExplorer	    Masterchest
1Btf1fzDsf4HtFeNMjcfwDzCygahfkoq21 3E-08           0.00000003                      0.00000003

Thanks Smiley

I've update jaddress.aspx but the consensus still sees 3E-08.

May have taken 5-10 minutes to update - seems good now Smiley  Thanks!

Smart Property & Distributed Exchange: Master Protocol for Bitcoin
zathras
Sr. Member
****
Offline Offline

Activity: 266
Merit: 250



View Profile
March 02, 2014, 07:57:22 PM
 #1075

Hey Guys,

I think you still need to invalidate the sell offers from 1DYb5Njvcgovt9gUMdMgYkpaQjAEdUooon - the bitcoins desired field is zero and the spec says it must be at minimum 1.

Thanks
Zathras

Smart Property & Distributed Exchange: Master Protocol for Bitcoin
grazcoin
Sr. Member
****
Offline Offline

Activity: 284
Merit: 250



View Profile
March 02, 2014, 10:50:57 PM
 #1076

The end of February is here. If you have worked on any element of our distributed exchange, engaged in testing, worked on the spec, laid the groundwork for smart property, or did something nifty for the project you'd like to be considered for the general innovations bounty, please fill out this form:

https://docs.google.com/forms/d/12RJqahjVjwRi2xXHKbhJurb4d7uWK21ZxD7EZIlMzuI/viewform

YOUR WORK SUMMARIES ARE DUE WITHIN 5 DAYS (3/6/2013 0:00:00 GMT) to qualify for bounty payout. Please do this early, and do it well, to ensure your maximum possible payout.

Thanks!


I have submitted my work summary, but I got no feedback/indication that it really arrived to its destination.
Has it?

Grazcoin


grazcoin
Sr. Member
****
Offline Offline

Activity: 284
Merit: 250



View Profile
March 02, 2014, 11:25:23 PM
 #1077

Zathras,

I am checking the parsing of the address 1EqTta1Rt8ixAA32DuC29oukbsSWU62qAV
It seems that for the following sell offer:
https://masterchest.info/lookuptx.aspx?txid=ab68bf2b0cd7fcd1f5acf03b286d565016335448c68737ba39600968b998cd9e
masterchest misses the accept.
This accept exists on masterchain and mymastercoins:
https://masterchain.info/sellaccept.html?tx=68f8f0d91f7a10289e8cf5efb98a95d3d1850f1f1df7307c188858bd59e7b4b5&currency=TMSC
http://mymastercoins.com/Default.aspx?txid=68f8f0d91f7a10289e8cf5efb98a95d3d1850f1f1df7307c188858bd59e7b4b5

any reason?


grazcoin
Sr. Member
****
Offline Offline

Activity: 284
Merit: 250



View Profile
March 02, 2014, 11:30:30 PM
 #1078

Hey Guys,

I think you still need to invalidate the sell offers from 1DYb5Njvcgovt9gUMdMgYkpaQjAEdUooon - the bitcoins desired field is zero and the spec says it must be at minimum 1.

Thanks
Zathras

you are right.
I will update that.


Bitoy
Sr. Member
****
Offline Offline

Activity: 449
Merit: 250


View Profile
March 03, 2014, 12:20:36 AM
 #1079

Hey Guys,

I think you still need to invalidate the sell offers from 1DYb5Njvcgovt9gUMdMgYkpaQjAEdUooon - the bitcoins desired field is zero and the spec says it must be at minimum 1.

Thanks
Zathras

Ok will invalidate sell offers with bitcoin desired = 0
Bitoy
Sr. Member
****
Offline Offline

Activity: 449
Merit: 250


View Profile
March 03, 2014, 12:48:00 AM
 #1080

1EqTta1Rt8ixAA32DuC29oukbsSWU62qAV


8708d411b92bb5741c2219452931a849c2e312906ec51f18e8499dcf9e1377eb
Valid sell offer for 3 tmsc

ecfd97ed2b4dce3fc3a3e47b65fa3cd4cbf8f8d0d4e15a7966c38058576a5707
Payment for 3 tmsc from 1BK


The new sell offer below is valid in mymastercoins but invalid in masterchain. I think it should be valid since the previous sell offer was filled.

7be299b8e934268aefadb904bf5e7e64a0f5795009447118de3e0040eee00454
Version 1 new sell offer

If the tx above is valid, the tx below should be valid also because it now has a prior sell offer.

464317c3156108e33d3cb08b455fbc126055c5efb4bc23c91a1237f64816274c
Masterchain no prior offer. 


Masterchest invalidates simple send from 1Bk to 1EQ
20f6bc00fe792a063021f24b7194ceab9c23afa457a126ab2164edf63f39083e
Pages: « 1 ... 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 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 [54] 55 56 57 58 59 60 61 62 63 64 65 »
  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!