Pages:
Author

Topic: 300 BTC Coding Contest: Distributed Exchange (MasterCoin Developer Thread) - page 50. (Read 129207 times)

sr. member
Activity: 449
Merit: 250
I would like to make a suggestion

Regarding the time limit, Currently the timelimit is  in # blocks.   My suggestion is to set it to days so that user will know when his offer will expire.

Timelimit is not for the seller; it's for the person sending an Accept Offer message.
 
When making a payment,Seller sends payment in BTC to Buyer Address and a dust amount (ex. 0.00007)  to the exodus address.   

This will make parsing of payments easier.
 

This is already in the spec.

Yes the time limit is for the seller.  What if the seller would like to place a time limit on his offer? Ie price is valid 7 days from now.  Anyway it is just a thought.  Thank you for your response.

Is there already a transaction Id with a confirmed payment?


hero member
Activity: 938
Merit: 1000
I would like to make a suggestion

Regarding the time limit, Currently the timelimit is  in # blocks.   My suggestion is to set it to days so that user will know when his offer will expire.

Timelimit is not for the seller; it's for the person sending an Accept Offer message.
 
When making a payment,Seller sends payment in BTC to Buyer Address and a dust amount (ex. 0.00007)  to the exodus address.   

This will make parsing of payments easier.
 

This is already in the spec.
sr. member
Activity: 449
Merit: 250
I would like to make a suggestion

Regarding the time limit, Currently the timelimit is  in # blocks.   My suggestion is to set it to days so that user will know when his offer will expire.


When making a payment,Seller sends payment in BTC to Buyer Address and a dust amount (ex. 0.00007)  to the exodus address.   

This will make parsing of payments easier.
 
sr. member
Activity: 449
Merit: 250

Yeah, I think we should use the timestamp of the most recent bitcoin block, rather than the node's local clock.

I guess the full formula is actually (1-(0.5^y)) * 10% * total number of mastercoins bought at 1Exodus before the deadline

Could somebody confirm my vesting calculation is correct?

Let's set the time to 2013-10-31 10:45:45 +0100 the output I get for the Exodus vesting is MSC 6103.51504811.

Just a quick note on this one - I'm getting slightly different amounts, can you let me know what you're using for your fixed values?

I'm using:
* Seconds in a year: 31557600
* End of funding: 1377993600
* Total Reward Mastercoins: 56316.23576222

Using your example time (1383212745) I'm seeing 6099.57209817.



I'm getting

6107.4878641923424

Seconds in a year: (60*60*24*365) 31536000
End of funding: 9/1/2013
Total Reward Mastercoins: 6107.4878641923424

My code is

Dim Gencoins2 As Double = (1 - (0.5 ^ (DateDiff(DateInterval.Second, #9/1/2013#, #10/31/2013 10:45:45 AM#) / 31536000))) * 0.1 * 563162.36


hero member
Activity: 938
Merit: 1000
I am trying to create a sell order for a few fractions of Test Mastercoins. I find the following labels in the "Building new selling offer " page confusing and/or ambiguous:

* Amount
* Amount desired

Do these refer to total Test Mastercoins for sale and total amount desired?
These should read, perhaps, for clarity

* Amount for sale
* Total sale price

or

* Number of (Test) Mastercoins for sale
* Price per (Test) Mastercoin

Which browser are you using? The placeholder text should offer more information. Amount says: "Total amount of MSC to sell" and the amount desired says "Total amount of Bitcoin". I figured most browser support placeholder text by now but if not I can probably add some hints to the fields to make it more clear.

A little sidenote, I orginally build this just for developers so they had an easy way to compare implementation outputs. I did not really expect consumer to use it.


Yeah, I think we should use the timestamp of the most recent bitcoin block, rather than the node's local clock.

I guess the full formula is actually (1-(0.5^y)) * 10% * total number of mastercoins bought at 1Exodus before the deadline

Could somebody confirm my vesting calculation is correct?

Let's set the time to 2013-10-31 10:45:45 +0100 the output I get for the Exodus vesting is MSC 6103.51504811.

Just a quick note on this one - I'm getting slightly different amounts, can you let me know what you're using for your fixed values?

I'm using:
* Seconds in a year: 31557600
* End of funding: 1377993600
* Total Reward Mastercoins: 56316.23576222

Using your example time (1383212745) I'm seeing 6099.57209817.

Thanks for checking. This is what I'm using now.

Code:
      time_difference = (tx_date - Mastercoin::END_TIME) / 60 / 60 / 24 / 365.25
      exodus_vesting = (1-(0.5**time_difference)) * 0.1 * 563_162.23576222

tx_date = 1383212745
Mastercoin::END_TIME = 1377993600
time_difference = 5219145

Giving me a total of 6060.791436028762 (I initially used a rounded down value for the total amount of MSC, doh.)

1EdAjiApS5cCpHdH4RKPMab1xmMVRWjLvk to buy 20 test MSC from 13NRX88EZbS5q81x6XFrTECzrciPREo821
Just successfully sent my first test transaction on the BTC to MSC decentralized exchange.

At first nothing happened so I entered the transaction hash into Mastercoin explorer:
http://mastercoin-explorer.com/transactions/33644e6f24b29e1ef170d78ff04eab6f7e19368908edc6d477f9902697a71d67

It seems that the process could be more streamlined but it does seem to work. Now I'll wait to see if I receive 20 test MSC

Complete success:
http://mastercoin-explorer.com/addresses/1EdAjiApS5cCpHdH4RKPMab1xmMVRWjLvk

Now the selling offer:
e1a53bf47d64391294d07110f6cc9f94e56963e960829ad45886c9800047a6bf

It should broadcast here:
http://mastercoin-explorer.com/order_books

Congrats! Awesome that you managed to get it all to work. Now I have some more coins to buy for my own tests since buying from yourself is just silly.
full member
Activity: 234
Merit: 105
I am trying to create a sell order for a few fractions of Test Mastercoins. I find the following labels in the "Building new selling offer " page confusing and/or ambiguous:

* Amount
* Amount desired

Do these refer to total Test Mastercoins for sale and total amount desired?
These should read, perhaps, for clarity

* Amount for sale
* Total sale price

or

* Number of (Test) Mastercoins for sale
* Price per (Test) Mastercoin
full member
Activity: 201
Merit: 100


Quote
What if I dont have the mastercoins on my bitcoin-qt wallet but on the blockchain's wallet ? will I still manaage to broadcast the transaction ?

https://www.facebook.com/groups/213147185526904/214802042028085/?comment_id=214808968694059¬if_t=group_comment


========EDIT=======

Nevermind I found the answer to this

https://blockchain.info/pushtx

I saw that also but could not figure out how to sign the raw transaction.  Would be nice if blockchain.info could also be used in addition to the console but I couldn't find a way to do it.
sr. member
Activity: 266
Merit: 250

Yeah, I think we should use the timestamp of the most recent bitcoin block, rather than the node's local clock.

I guess the full formula is actually (1-(0.5^y)) * 10% * total number of mastercoins bought at 1Exodus before the deadline

Could somebody confirm my vesting calculation is correct?

Let's set the time to 2013-10-31 10:45:45 +0100 the output I get for the Exodus vesting is MSC 6103.51504811.

Just a quick note on this one - I'm getting slightly different amounts, can you let me know what you're using for your fixed values?

I'm using:
* Seconds in a year: 31557600
* End of funding: 1377993600
* Total Reward Mastercoins: 56316.23576222

Using your example time (1383212745) I'm seeing 6099.57209817.

hero member
Activity: 714
Merit: 510
1EdAjiApS5cCpHdH4RKPMab1xmMVRWjLvk to buy 20 test MSC from 13NRX88EZbS5q81x6XFrTECzrciPREo821
Just successfully sent my first test transaction on the BTC to MSC decentralized exchange.

At first nothing happened so I entered the transaction hash into Mastercoin explorer:
http://mastercoin-explorer.com/transactions/33644e6f24b29e1ef170d78ff04eab6f7e19368908edc6d477f9902697a71d67

It seems that the process could be more streamlined but it does seem to work. Now I'll wait to see if I receive 20 test MSC

Complete success:
http://mastercoin-explorer.com/addresses/1EdAjiApS5cCpHdH4RKPMab1xmMVRWjLvk

Now the selling offer:
e1a53bf47d64391294d07110f6cc9f94e56963e960829ad45886c9800047a6bf

It should broadcast here:
http://mastercoin-explorer.com/order_books
hero member
Activity: 938
Merit: 1000
As long as you can sign rawtransactions you can use this. Complete: false either means the person did not sign the transaction or that he signed it but did not possess the right private key to sign it. 
legendary
Activity: 1666
Merit: 1010
he who has the gold makes the rules
Seems the fee was not set properly. I'm investigating.

okay thanks.

I do not think I will get that many hits on the tutorial, if I do I will take it down.

Here is another question from someone in the FB group (I thought I had heard someone discuss this and saying that we should not store MSC on blockchain wallets right?)

Quote
What if I dont have the mastercoins on my bitcoin-qt wallet but on the blockchain's wallet ? will I still manaage to broadcast the transaction ?

https://www.facebook.com/groups/213147185526904/214802042028085/?comment_id=214808968694059¬if_t=group_comment


========EDIT=======

Nevermind I found the answer to this

https://blockchain.info/pushtx
hero member
Activity: 938
Merit: 1000
Seems the fee was not set properly. I'm investigating.

Edit: I'm guessing you kept the fee set to 0.00001 ? This is lower then the required network fee. I've updated the code to force the fee to 0.0001 when it's set lower so other users don't make this mistake.
hero member
Activity: 938
Merit: 1000
here is the tx hash

9d6c10c366036f3523b81437ebaa68f62cce89f9951e97022c129ae39008b475

so the .00025 are actually fees and are for sending out the transaction offer?

on the build page the only thing I changed was the "amount" from 10 to 4

I was trying to set up a buy to this offer

http://mastercoin-explorer.com/purchase_offers/new?address=13NRX88EZbS5q81x6XFrTECzrciPREo821&amount=10.0¤cy_id=2&forced_fee=0.00001

Sorry I should have asked for the encoded transaction, do you still have that? The raw transaction hash?

this right?

Code:

{
"hex" : "01000000011bfb75ae8a4327c54c74e8c5f8793b054ab36603786bc64ba56a08f3834dc57c040000006a47304402202b839fe4159c2d071c9a8075e5f00130b8c2e49ee2aa5c90bb1613606d9fd96302201391ea704f54c001a402e4f039806d5221c48b83a64d3cac255cb48399eadd6d012102c21e89b7366d902a18632d86c788bc1fd5d4432a8decc23f742ff2ea3ec86cc2ffffffff0438ae9600000000001976a914157d5a4d561c5e36e37037ec962971aa0f761cbf88ac70170000000000001976a91419fd7459d1c21227f3e87582fa1de350b1549ae288ac70170000000000001976a914946cb2e08075bcbaf157e47bcb67eb2b2339d24288ace02e00000000000047512102c21e89b7366d902a18632d86c788bc1fd5d4432a8decc23f742ff2ea3ec86cc22102e53e090dad2a9813ae5583a18dd412852f932bb00d1f877482d17d5251fcaf3952ae00000000",
"complete" : true
}


sorry not great at the nomenclature yet

Yeah this is it.
I have a question from someone else

Quote
Should it work even if my wallet doesn’t fully synced with the network ? I’m getting “complete” : false

http://blog.mastercoin.org/2013/11/02/tutorial-test-msc-btc-distributed-exchange-transactions/comment-page-1/#comment-4


I wouldn't advertise it on your blog yet. It's a bit too early for early adoption.
legendary
Activity: 1666
Merit: 1010
he who has the gold makes the rules
I have a question from someone else

Quote
Should it work even if my wallet doesn’t fully synced with the network ? I’m getting “complete” : false

http://blog.mastercoin.org/2013/11/02/tutorial-test-msc-btc-distributed-exchange-transactions/comment-page-1/#comment-4
legendary
Activity: 1666
Merit: 1010
he who has the gold makes the rules
here is the tx hash

9d6c10c366036f3523b81437ebaa68f62cce89f9951e97022c129ae39008b475

so the .00025 are actually fees and are for sending out the transaction offer?

on the build page the only thing I changed was the "amount" from 10 to 4

I was trying to set up a buy to this offer

http://mastercoin-explorer.com/purchase_offers/new?address=13NRX88EZbS5q81x6XFrTECzrciPREo821&amount=10.0¤cy_id=2&forced_fee=0.00001

Sorry I should have asked for the encoded transaction, do you still have that? The raw transaction hash?

this right?

Code:

{
"hex" : "01000000011bfb75ae8a4327c54c74e8c5f8793b054ab36603786bc64ba56a08f3834dc57c040000006a47304402202b839fe4159c2d071c9a8075e5f00130b8c2e49ee2aa5c90bb1613606d9fd96302201391ea704f54c001a402e4f039806d5221c48b83a64d3cac255cb48399eadd6d012102c21e89b7366d902a18632d86c788bc1fd5d4432a8decc23f742ff2ea3ec86cc2ffffffff0438ae9600000000001976a914157d5a4d561c5e36e37037ec962971aa0f761cbf88ac70170000000000001976a91419fd7459d1c21227f3e87582fa1de350b1549ae288ac70170000000000001976a914946cb2e08075bcbaf157e47bcb67eb2b2339d24288ace02e00000000000047512102c21e89b7366d902a18632d86c788bc1fd5d4432a8decc23f742ff2ea3ec86cc22102e53e090dad2a9813ae5583a18dd412852f932bb00d1f877482d17d5251fcaf3952ae00000000",
"complete" : true
}

or this one

Code:

signrawtransaction 01000000011bfb75ae8a4327c54c74e8c5f8793b054ab36603786bc64ba56a08f3834dc57c0400000000ffffffff0438ae9600000000001976a914157d5a4d561c5e36e37037ec962971aa0f761cbf88ac70170000000000001976a91419fd7459d1c21227f3e87582fa1de350b1549ae288ac70170000000000001976a914946cb2e08075bcbaf157e47bcb67eb2b2339d24288ace02e00000000000047512102c21e89b7366d902a18632d86c788bc1fd5d4432a8decc23f742ff2ea3ec86cc22102e53e090dad2a9813ae5583a18dd412852f932bb00d1f877482d17d5251fcaf3952ae00000000

sorry not great at the nomenclature yet
hero member
Activity: 938
Merit: 1000
here is the tx hash

9d6c10c366036f3523b81437ebaa68f62cce89f9951e97022c129ae39008b475

so the .00025 are actually fees and are for sending out the transaction offer?

on the build page the only thing I changed was the "amount" from 10 to 4

I was trying to set up a buy to this offer

http://mastercoin-explorer.com/purchase_offers/new?address=13NRX88EZbS5q81x6XFrTECzrciPREo821&amount=10.0¤cy_id=2&forced_fee=0.00001

Sorry I should have asked for the encoded transaction, do you still have that? The raw transaction hash?
legendary
Activity: 1666
Merit: 1010
he who has the gold makes the rules
here is the tx hash

9d6c10c366036f3523b81437ebaa68f62cce89f9951e97022c129ae39008b475

so the .00025 are actually fees and are for sending out the transaction offer?

on the build page the only thing I changed was the "amount" from 10 to 4

I was trying to set up a buy to this offer

http://mastercoin-explorer.com/purchase_offers/new?address=13NRX88EZbS5q81x6XFrTECzrciPREo821&amount=10.0¤cy_id=2&forced_fee=0.00001
hero member
Activity: 938
Merit: 1000
then I went here, because the instructions say to decode the raw tx to do a check

http://mastercoin-explorer.com/raw/transactions/new

i got this page





but if i went here

https://coinb.in/decode-raw-transaction.html

I get



That page on Mastercoin explorer is meant to decode raw Mastercoin keys, not Bitcoin transactions. Also verifying the output of a site using the same site is madness. The whole point is to verify that the site is not lying to you.

ok another issue (I probably am doing something wrong but I cannot figure it out)

so i did sendrawtransaction

and got this




but a few blocks have passed now and none of those tx have any confirmation

also I have a question about the 0.00012 amount where is that going?

Can you give me the transaction id? Perhaps the fee was too low or something similar.

The 0.000012 is the output for the Mulitisig output.
Quote
Note that after you send this purchase offer and it's accepted by the site you will have to send the proper amount in Bitcoin from your MasterCoin address. Make sure your address is funded and that you send the coins from this address.

Isn't this already a part of the sendrawtransaction?  Or am I mistaken?  

Also in the "Amount" in the "Building new purchase offer"  what does this mean?

 I understood it to mean how many MSC I want to buy from the offer but perhaps I got it wrong because the sell offer wanted 0.0001 btc and my total out btc was 0.0025, and I put in 4 as the amount (assumed it would be 4 MSC).

thanks!

You are indeed mistaken. Only once your "Accept Purchase" has been confirmed in a block and flagged as valid can you send the actual Bitcoin amount. This does not happen at the same time. You were right about the amount. It's the amount you want to buy from the offer.

A general note: you don't have to rely on an external site to decode your transaction. You can use the Bitcoin console for this as well. Just type decoderawtransaction .
sr. member
Activity: 449
Merit: 250
Hi Tachikoma,

Please check
1GD6YyXnd7DKvfUKs22Fp3FSGuvK6n4F4j

the MSC balance is negative.


also
1HRE7U9XNPD8kJBCwm5Q1VAepz25GBXnVk
Master-explorer balance 500

The balance in Masterchest is 0.  Same as what I got in my server.
Pages:
Jump to: