Business Proposal with HUGE potential - automated BTC->bitBTC bridge

Started by xeroc, September 11, 2014, 12:35:37 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

xeroc

Quote from: zhangweis on September 11, 2014, 11:07:47 PM
Is it easy to do that in javascript? I'm thinking of a way to generate btc keys in an offline chromebook and get btsx public key from btc keys.
should be manageable .. somehow .. maybe we can even extend "brainwallet.org" to run with BTSX pubkeys ...
anyone feeling up to it? (me certainly not,  not a coder at this keyboard :-)  )

zhangweis

Quote from: xeroc on September 11, 2014, 05:10:45 PM
back to the topic:
If there is interest I can start write down some details on what to do to get btsx keys from btc keys ..

Is it easy to do that in javascript? I'm thinking of a way to generate btc keys in an offline chromebook and get btsx public key from btc keys.
Weibo:[url="http://weibo.com/zhangweis"]http://weibo.com/zhangweis[/url]

jsidhu

Quote from: luckybit on September 11, 2014, 09:03:07 PM
Quote from: jsidhu on September 11, 2014, 05:22:04 PM
Quote from: xeroc on September 11, 2014, 05:16:36 PM
Quote from: jsidhu on September 11, 2014, 03:18:48 PM
Quote from: xeroc on September 11, 2014, 01:19:12 PM
Quote from: luckybit on September 11, 2014, 01:11:38 PM
Where does the Bitcoin address come from?
Can you explain that? Or are you saying somehow a Bitcoin wallet is built into Bitshares X?
No there is no bitcoin wallet integrated .. not exactly .. you cannot interact with the btc blockchain from within the btsx wallet.
However .. as both use the same elliptic curve crypto the private keys that generate you btsx account public key can also be used to derive a bitcion public key and from thus the bitcoin address ...

imagine: every 256 bit sequence can be interpreted as private key .. from there you can go to btsx .. or to btc .. or to both ..
if you were to send btc to the address in the btsx wallte you would need to export the corresponding private key .. import it into electrum or what every and can go on from there ... no magic .. just 256 arbitrary bits :)

Quote
I know some of us imported Bitcoin addresses but not everyone.
you can go the otherway too and import your btsx keys into bitcoin :)

Most people would already have BTC addresses set up externally so this feature is really only useful when validating that the output is sent to a valid btc address and the time when users just create a btc address to send to and then import their priv key into the btc wallet to retrieve the coins.. pretty useless IMO.

I wonder if we integrate into vennd api what it involves.. would it be useful to do such a thing? Are people using it? If it has volume then maybe its a good idea.. or we can brand it as another btsx product and do it from scratch if its not too hard.

This can be done in a trustless way, I will show an example using the web wallet:

1) Set up bitcore(http://bitcore.io)
2) When sending BTC, you send to your btsx address.
3) Import bitBTC into btsx web wallet via an import command which monitors the bitcore wallet balance for change, and updates bitBTC balance accordingly.
4) Sending bitBTC back to a BTC address would invoke bitcore to send the coins to another address, and re-update bitBTC balance based on the transaction in bitcore.

Because each node in btsx would have ability to connect to their own bit core wallet it is decentralized and trustless. You would keep your private key private and have ability to send BTC right to your btsx address and back to your BTC address seamlessly. Bitcore is able to get balance information of arbritrary bitcoin addresses without doing any private key imports, which is something the RPC can't do.

I think counterparty and thus vend might be already using this mechanism but in a central manor? They host bit core for you? I see that bitcore is used in counterparty but not sure if vennd is using it for the vending machine. http://bitcore.io/blog/ has a blog about counterparty using bit core.

Since its code compatible with the btsx web wallet you can do something like:

var bitcore = require('bitcore');
var Address = bitcore.Address;

var addr = new Address("1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa");

console.log(addr.isValid());

right in btsx and interact with bitcoin. Doing a TX is done in the same way with a bit more code. It needs to run against a trusted node, so that can be a local node or external (not sure if you can simply point to some DNS seed like the normal nodes do)

Wow .. I just now realize what you are saying .. building all of this as a web_wallet plugin... sounds nice ..
you still need someone to run a service that takes BTC and gives away bitBTC ... (or the otherway round) by parsing the blockchain
Well you wouldn't need to parse the blockchain as thats the point of using bitcore... a decentralized version of blockchain.info api. But yea you still need a way to give you bitBTC and taking BTC from you... and vice versa..This would be important because as the traded value of bitBTC fluctuates people will want to arb the value and transfer back to BTC... or arb BTC and transfer back to bitBTC, so it has to support high volume and be decentralized.

The service should be using the bitBTC/BTC exchange rate to do the conversion.. im just unclear as to how we can essentially "lock" the BTC so that they can't transfer to bitBTC and then double spend by importing their key into the bitcoin blockchain aswell. How does bitUSD/USD solve this issue?
Fiat goes by different rules. BitUSD -> USD must be centralized. Crypto to Crypto can be decentralized and never touch the financial infrastructure.

Hmm.. well seems even with bitBTC / BTC you still have a point of centralization when you convert the asset, so might aswell keep it on exchanges then?
Hired by blockchain | Developer
delegate: dev.sidhujag

luckybit

Quote from: jsidhu on September 11, 2014, 05:22:04 PM
Quote from: xeroc on September 11, 2014, 05:16:36 PM
Quote from: jsidhu on September 11, 2014, 03:18:48 PM
Quote from: xeroc on September 11, 2014, 01:19:12 PM
Quote from: luckybit on September 11, 2014, 01:11:38 PM
Where does the Bitcoin address come from?
Can you explain that? Or are you saying somehow a Bitcoin wallet is built into Bitshares X?
No there is no bitcoin wallet integrated .. not exactly .. you cannot interact with the btc blockchain from within the btsx wallet.
However .. as both use the same elliptic curve crypto the private keys that generate you btsx account public key can also be used to derive a bitcion public key and from thus the bitcoin address ...

imagine: every 256 bit sequence can be interpreted as private key .. from there you can go to btsx .. or to btc .. or to both ..
if you were to send btc to the address in the btsx wallte you would need to export the corresponding private key .. import it into electrum or what every and can go on from there ... no magic .. just 256 arbitrary bits :)

Quote
I know some of us imported Bitcoin addresses but not everyone.
you can go the otherway too and import your btsx keys into bitcoin :)

Most people would already have BTC addresses set up externally so this feature is really only useful when validating that the output is sent to a valid btc address and the time when users just create a btc address to send to and then import their priv key into the btc wallet to retrieve the coins.. pretty useless IMO.

I wonder if we integrate into vennd api what it involves.. would it be useful to do such a thing? Are people using it? If it has volume then maybe its a good idea.. or we can brand it as another btsx product and do it from scratch if its not too hard.

This can be done in a trustless way, I will show an example using the web wallet:

1) Set up bitcore(http://bitcore.io)
2) When sending BTC, you send to your btsx address.
3) Import bitBTC into btsx web wallet via an import command which monitors the bitcore wallet balance for change, and updates bitBTC balance accordingly.
4) Sending bitBTC back to a BTC address would invoke bitcore to send the coins to another address, and re-update bitBTC balance based on the transaction in bitcore.

Because each node in btsx would have ability to connect to their own bit core wallet it is decentralized and trustless. You would keep your private key private and have ability to send BTC right to your btsx address and back to your BTC address seamlessly. Bitcore is able to get balance information of arbritrary bitcoin addresses without doing any private key imports, which is something the RPC can't do.

I think counterparty and thus vend might be already using this mechanism but in a central manor? They host bit core for you? I see that bitcore is used in counterparty but not sure if vennd is using it for the vending machine. http://bitcore.io/blog/ has a blog about counterparty using bit core.

Since its code compatible with the btsx web wallet you can do something like:

var bitcore = require('bitcore');
var Address = bitcore.Address;

var addr = new Address("1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa");

console.log(addr.isValid());

right in btsx and interact with bitcoin. Doing a TX is done in the same way with a bit more code. It needs to run against a trusted node, so that can be a local node or external (not sure if you can simply point to some DNS seed like the normal nodes do)

Wow .. I just now realize what you are saying .. building all of this as a web_wallet plugin... sounds nice ..
you still need someone to run a service that takes BTC and gives away bitBTC ... (or the otherway round) by parsing the blockchain
Well you wouldn't need to parse the blockchain as thats the point of using bitcore... a decentralized version of blockchain.info api. But yea you still need a way to give you bitBTC and taking BTC from you... and vice versa..This would be important because as the traded value of bitBTC fluctuates people will want to arb the value and transfer back to BTC... or arb BTC and transfer back to bitBTC, so it has to support high volume and be decentralized.

The service should be using the bitBTC/BTC exchange rate to do the conversion.. im just unclear as to how we can essentially "lock" the BTC so that they can't transfer to bitBTC and then double spend by importing their key into the bitcoin blockchain aswell. How does bitUSD/USD solve this issue?
Fiat goes by different rules. BitUSD -> USD must be centralized. Crypto to Crypto can be decentralized and never touch the financial infrastructure.
[url="https://metaexchange.info"]https://metaexchange.info[/url] | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

jsidhu

Quote from: xeroc on September 11, 2014, 05:16:36 PM
Quote from: jsidhu on September 11, 2014, 03:18:48 PM
Quote from: xeroc on September 11, 2014, 01:19:12 PM
Quote from: luckybit on September 11, 2014, 01:11:38 PM
Where does the Bitcoin address come from?
Can you explain that? Or are you saying somehow a Bitcoin wallet is built into Bitshares X?
No there is no bitcoin wallet integrated .. not exactly .. you cannot interact with the btc blockchain from within the btsx wallet.
However .. as both use the same elliptic curve crypto the private keys that generate you btsx account public key can also be used to derive a bitcion public key and from thus the bitcoin address ...

imagine: every 256 bit sequence can be interpreted as private key .. from there you can go to btsx .. or to btc .. or to both ..
if you were to send btc to the address in the btsx wallte you would need to export the corresponding private key .. import it into electrum or what every and can go on from there ... no magic .. just 256 arbitrary bits :)

Quote
I know some of us imported Bitcoin addresses but not everyone.
you can go the otherway too and import your btsx keys into bitcoin :)

Most people would already have BTC addresses set up externally so this feature is really only useful when validating that the output is sent to a valid btc address and the time when users just create a btc address to send to and then import their priv key into the btc wallet to retrieve the coins.. pretty useless IMO.

I wonder if we integrate into vennd api what it involves.. would it be useful to do such a thing? Are people using it? If it has volume then maybe its a good idea.. or we can brand it as another btsx product and do it from scratch if its not too hard.

This can be done in a trustless way, I will show an example using the web wallet:

1) Set up bitcore(http://bitcore.io)
2) When sending BTC, you send to your btsx address.
3) Import bitBTC into btsx web wallet via an import command which monitors the bitcore wallet balance for change, and updates bitBTC balance accordingly.
4) Sending bitBTC back to a BTC address would invoke bitcore to send the coins to another address, and re-update bitBTC balance based on the transaction in bitcore.

Because each node in btsx would have ability to connect to their own bit core wallet it is decentralized and trustless. You would keep your private key private and have ability to send BTC right to your btsx address and back to your BTC address seamlessly. Bitcore is able to get balance information of arbritrary bitcoin addresses without doing any private key imports, which is something the RPC can't do.

I think counterparty and thus vend might be already using this mechanism but in a central manor? They host bit core for you? I see that bitcore is used in counterparty but not sure if vennd is using it for the vending machine. http://bitcore.io/blog/ has a blog about counterparty using bit core.

Since its code compatible with the btsx web wallet you can do something like:

var bitcore = require('bitcore');
var Address = bitcore.Address;

var addr = new Address("1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa");

console.log(addr.isValid());

right in btsx and interact with bitcoin. Doing a TX is done in the same way with a bit more code. It needs to run against a trusted node, so that can be a local node or external (not sure if you can simply point to some DNS seed like the normal nodes do)

Wow .. I just now realize what you are saying .. building all of this as a web_wallet plugin... sounds nice ..
you still need someone to run a service that takes BTC and gives away bitBTC ... (or the otherway round) by parsing the blockchain
Well you wouldn't need to parse the blockchain as thats the point of using bitcore... a decentralized version of blockchain.info api. But yea you still need a way to give you bitBTC and taking BTC from you... and vice versa..This would be important because as the traded value of bitBTC fluctuates people will want to arb the value and transfer back to BTC... or arb BTC and transfer back to bitBTC, so it has to support high volume and be decentralized.

The service should be using the bitBTC/BTC exchange rate to do the conversion.. im just unclear as to how we can essentially "lock" the BTC so that they can't transfer to bitBTC and then double spend by importing their key into the bitcoin blockchain aswell. How does bitUSD/USD solve this issue?
Hired by blockchain | Developer
delegate: dev.sidhujag

xeroc

Quote from: jsidhu on September 11, 2014, 03:18:48 PM
Quote from: xeroc on September 11, 2014, 01:19:12 PM
Quote from: luckybit on September 11, 2014, 01:11:38 PM
Where does the Bitcoin address come from?
Can you explain that? Or are you saying somehow a Bitcoin wallet is built into Bitshares X?
No there is no bitcoin wallet integrated .. not exactly .. you cannot interact with the btc blockchain from within the btsx wallet.
However .. as both use the same elliptic curve crypto the private keys that generate you btsx account public key can also be used to derive a bitcion public key and from thus the bitcoin address ...

imagine: every 256 bit sequence can be interpreted as private key .. from there you can go to btsx .. or to btc .. or to both ..
if you were to send btc to the address in the btsx wallte you would need to export the corresponding private key .. import it into electrum or what every and can go on from there ... no magic .. just 256 arbitrary bits :)

Quote
I know some of us imported Bitcoin addresses but not everyone.
you can go the otherway too and import your btsx keys into bitcoin :)

Most people would already have BTC addresses set up externally so this feature is really only useful when validating that the output is sent to a valid btc address and the time when users just create a btc address to send to and then import their priv key into the btc wallet to retrieve the coins.. pretty useless IMO.

I wonder if we integrate into vennd api what it involves.. would it be useful to do such a thing? Are people using it? If it has volume then maybe its a good idea.. or we can brand it as another btsx product and do it from scratch if its not too hard.

This can be done in a trustless way, I will show an example using the web wallet:

1) Set up bitcore(http://bitcore.io)
2) When sending BTC, you send to your btsx address.
3) Import bitBTC into btsx web wallet via an import command which monitors the bitcore wallet balance for change, and updates bitBTC balance accordingly.
4) Sending bitBTC back to a BTC address would invoke bitcore to send the coins to another address, and re-update bitBTC balance based on the transaction in bitcore.

Because each node in btsx would have ability to connect to their own bit core wallet it is decentralized and trustless. You would keep your private key private and have ability to send BTC right to your btsx address and back to your BTC address seamlessly. Bitcore is able to get balance information of arbritrary bitcoin addresses without doing any private key imports, which is something the RPC can't do.

I think counterparty and thus vend might be already using this mechanism but in a central manor? They host bit core for you? I see that bitcore is used in counterparty but not sure if vennd is using it for the vending machine. http://bitcore.io/blog/ has a blog about counterparty using bit core.

Since its code compatible with the btsx web wallet you can do something like:

var bitcore = require('bitcore');
var Address = bitcore.Address;

var addr = new Address("1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa");

console.log(addr.isValid());

right in btsx and interact with bitcoin. Doing a TX is done in the same way with a bit more code. It needs to run against a trusted node, so that can be a local node or external (not sure if you can simply point to some DNS seed like the normal nodes do)

Wow .. I just now realize what you are saying .. building all of this as a web_wallet plugin... sounds nice ..
you still need someone to run a service that takes BTC and gives away bitBTC ... (or the otherway round) by parsing the blockchain

xeroc

Quote from: GaltReport on September 11, 2014, 05:01:35 PM
I'm not an attorney or tax expert, :), but I think it's only when you convert it to fiat that taxes are due.  Like stocks.
That would be very nice
still need to check with a lawyer (just wanted to advertise :-) )

back to the topic:
If there is interest I can start write down some details on what to do to get btsx keys from btc keys ..

GaltReport

Quote from: xeroc on September 11, 2014, 04:08:30 PM
but if you make a profit from it you need to pay tax ... better clear this out with your local gov first

I'm not an attorney or tax expert, :), but I think it's only when you convert it to fiat that taxes are due.  Like stocks.

jsidhu

Quote from: luckybit on September 11, 2014, 04:19:42 PM
Quote from: jsidhu on September 11, 2014, 03:18:48 PM
Quote from: xeroc on September 11, 2014, 01:19:12 PM
Quote from: luckybit on September 11, 2014, 01:11:38 PM
Where does the Bitcoin address come from?
Can you explain that? Or are you saying somehow a Bitcoin wallet is built into Bitshares X?
No there is no bitcoin wallet integrated .. not exactly .. you cannot interact with the btc blockchain from within the btsx wallet.
However .. as both use the same elliptic curve crypto the private keys that generate you btsx account public key can also be used to derive a bitcion public key and from thus the bitcoin address ...

imagine: every 256 bit sequence can be interpreted as private key .. from there you can go to btsx .. or to btc .. or to both ..
if you were to send btc to the address in the btsx wallte you would need to export the corresponding private key .. import it into electrum or what every and can go on from there ... no magic .. just 256 arbitrary bits :)

Quote
I know some of us imported Bitcoin addresses but not everyone.
you can go the otherway too and import your btsx keys into bitcoin :)

Most people would already have BTC addresses set up externally so this feature is really only useful when validating that the output is sent to a valid btc address and the time when users just create a btc address to send to and then import their priv key into the btc wallet to retrieve the coins.. pretty useless IMO.

I wonder if we integrate into vennd api what it involves.. would it be useful to do such a thing? Are people using it? If it has volume then maybe its a good idea.. or we can brand it as another btsx product and do it from scratch if its not too hard.

This can be done in a trustless way, I will show an example using the web wallet:

1) Set up bitcore(http://bitcore.io)
2) When sending BTC, you send to your btsx address.
3) Import bitBTC into btsx web wallet via an import command which monitors the bitcore wallet balance for change, and updates bitBTC balance accordingly.
4) Sending bitBTC back to a BTC address would invoke bitcore to send the coins to another address, and re-update bitBTC balance based on the transaction in bitcore.

Because each node in btsx would have ability to connect to their own bit core wallet it is decentralized and trustless. You would keep your private key private and have ability to send BTC right to your btsx address and back to your BTC address seamlessly. Bitcore is able to get balance information of arbritrary bitcoin addresses without doing any private key imports, which is something the RPC can't do.

I think counterparty and thus vend might be already using this mechanism but in a central manor? They host bit core for you? I see that bitcore is used in counterparty but not sure if vennd is using it for the vending machine. http://bitcore.io/blog/ has a blog about counterparty using bit core.

Since its code compatible with the btsx web wallet you can do something like:

var bitcore = require('bitcore');
var Address = bitcore.Address;

var addr = new Address("1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa");

console.log(addr.isValid());

right in btsx and interact with bitcoin. Doing a TX is done in the same way with a bit more code. It needs to run against a trusted node, so that can be a local node or external (not sure if you can simply point to some DNS seed like the normal nodes do)
https://github.com/mastercoin-MSC/mastercore

Right so explain how it would work.. what about OT?
Hired by blockchain | Developer
delegate: dev.sidhujag

xeroc

oh .. I am not doing it ..
I am offering the idea and maybe advice .. for free ... but I have other fish to fry :-)

luckybit

Quote from: jsidhu on September 11, 2014, 03:18:48 PM
Quote from: xeroc on September 11, 2014, 01:19:12 PM
Quote from: luckybit on September 11, 2014, 01:11:38 PM
Where does the Bitcoin address come from?
Can you explain that? Or are you saying somehow a Bitcoin wallet is built into Bitshares X?
No there is no bitcoin wallet integrated .. not exactly .. you cannot interact with the btc blockchain from within the btsx wallet.
However .. as both use the same elliptic curve crypto the private keys that generate you btsx account public key can also be used to derive a bitcion public key and from thus the bitcoin address ...

imagine: every 256 bit sequence can be interpreted as private key .. from there you can go to btsx .. or to btc .. or to both ..
if you were to send btc to the address in the btsx wallte you would need to export the corresponding private key .. import it into electrum or what every and can go on from there ... no magic .. just 256 arbitrary bits :)

Quote
I know some of us imported Bitcoin addresses but not everyone.
you can go the otherway too and import your btsx keys into bitcoin :)

Most people would already have BTC addresses set up externally so this feature is really only useful when validating that the output is sent to a valid btc address and the time when users just create a btc address to send to and then import their priv key into the btc wallet to retrieve the coins.. pretty useless IMO.

I wonder if we integrate into vennd api what it involves.. would it be useful to do such a thing? Are people using it? If it has volume then maybe its a good idea.. or we can brand it as another btsx product and do it from scratch if its not too hard.

This can be done in a trustless way, I will show an example using the web wallet:

1) Set up bitcore(http://bitcore.io)
2) When sending BTC, you send to your btsx address.
3) Import bitBTC into btsx web wallet via an import command which monitors the bitcore wallet balance for change, and updates bitBTC balance accordingly.
4) Sending bitBTC back to a BTC address would invoke bitcore to send the coins to another address, and re-update bitBTC balance based on the transaction in bitcore.

Because each node in btsx would have ability to connect to their own bit core wallet it is decentralized and trustless. You would keep your private key private and have ability to send BTC right to your btsx address and back to your BTC address seamlessly. Bitcore is able to get balance information of arbritrary bitcoin addresses without doing any private key imports, which is something the RPC can't do.

I think counterparty and thus vend might be already using this mechanism but in a central manor? They host bit core for you? I see that bitcore is used in counterparty but not sure if vennd is using it for the vending machine. http://bitcore.io/blog/ has a blog about counterparty using bit core.

Since its code compatible with the btsx web wallet you can do something like:

var bitcore = require('bitcore');
var Address = bitcore.Address;

var addr = new Address("1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa");

console.log(addr.isValid());

right in btsx and interact with bitcoin. Doing a TX is done in the same way with a bit more code. It needs to run against a trusted node, so that can be a local node or external (not sure if you can simply point to some DNS seed like the normal nodes do)
https://github.com/mastercoin-MSC/mastercore
[url="https://metaexchange.info"]https://metaexchange.info[/url] | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

xeroc

ok .. so legal issues are probably non-existing .. why isn't this done then yet?

go for it!!! maybe group up to a team or sth... just get it done ASAP!!!

jsidhu

Quote from: luckybit on September 11, 2014, 04:00:55 PM
Quote from: xeroc on September 11, 2014, 03:48:13 PM
I am almost certain that the technical part is pretty easy to realize .. the legal part .. oh boy

If its illegal then how are Counterparty doing it? Crypto to Crypto doesn't involve USD.

If bit core doesnt qualify as a money transmitter then I don't think this will.
Hired by blockchain | Developer
delegate: dev.sidhujag

xeroc

but if you make a profit from it you need to pay tax ... better clear this out with your local gov first

luckybit

Quote from: xeroc on September 11, 2014, 03:48:13 PM
I am almost certain that the technical part is pretty easy to realize .. the legal part .. oh boy

If its illegal then how are Counterparty doing it? Crypto to Crypto doesn't involve USD.
[url="https://metaexchange.info"]https://metaexchange.info[/url] | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads