BitShares Forum

Main => General Discussion => Topic started by: xeroc on September 11, 2014, 12:35:37 pm

Title: Business Proposal with HUGE potential - automated BTC->bitBTC bridge
Post by: xeroc on September 11, 2014, 12:35:37 pm
Hey friends,

It came to me while lieing in bed yesterday and thought there might be someone
feeling up to the challenge. So:
 - I will not implement this
 - someone else (with good reputation in crypto) can make ALOT of money

The idea was to set a automated BTC to bitBTC bridge that makes it easy for the
bitcoin community to get hands on bitBTC. All what follows should work aswell
for the ANY other altcoin that uses EC crypto from the satoshi client.

About the automation:
Assume I'd like to exchange 100 BTC from the bitcoin blockchain to 100 bitBTC
on the bitshares blockchain.  A provider can publish a (single) BTC address to
collect bitcoin in exchange for bitBTC.  Every single deposit into that address
comes with a bitcoin transaction containing at least one public key
corresponding to a sending address:

My address -> tx with 100 btc and pubkey to my address -> BTC address for exchange

Now that public key can be converted into a public key on the BitShares
network.  Thus, the BTC can be used to buy up bitBTC from the market (external
or internal) and the resulting bitBTC can be sent to an address
that corresponds (via TITAN) to the public key from the bitcoin network above.
Hence, I can redeem my bitBTC using the private key of my sender address.

If volume picks up, people might want to move into bitBTC (or bitPTS, bitPPC,
...) quickly. This options enables them to do so by paying a fee of say 3% to
the service provider.

The drawbacks:
 - a (trusted) entity needs to run this
 - that entity needs to be liquid on BTC and bitBTC (exchange able)
 - a service (server) needs to be coded and audited by the public to run this
   service.
 - the btc pubkey needs to be converted to btsx pubkey (code exists, needs testing)

So, if you think you can do it profitable, give it a shot. If I had any BTC I'd
be your first costumer :)

Thoughts?
Title: Re: Business Proposal with HUGE potential - automated BTC->bitBTC bridge
Post by: Riverhead on September 11, 2014, 12:42:42 pm
I agree something like this will be a gold mine for someone. Maybe when BTSX gets to a point I can quit my "real" job I can tackle a project like this (i.e. recruit talented people and project manage haha).

My idea was Asset Servers like Chain/Node servers, but they serve the same purpose. If we've thought of this I'm sure others are as well. :D

https://bitsharestalk.org/index.php?topic=8626.msg111960#msg111960 (https://bitsharestalk.org/index.php?topic=8626.msg111960#msg111960)


Title: Re: Business Proposal with HUGE potential - automated BTC->bitBTC bridge
Post by: xeroc on September 11, 2014, 12:46:42 pm
https://bitsharestalk.org/index.php?topic=8626.msg111960#msg111960 (https://bitsharestalk.org/index.php?topic=8626.msg111960#msg111960)
thx .. cross posted!
Title: Re: Business Proposal with HUGE potential - automated BTC->bitBTC bridge
Post by: pc on September 11, 2014, 12:48:17 pm
I had the same idea a couple of weeks ago, then realized that I'd get into serious trouble for running such a service - at least here in Germany. Probably in any country with a regulated financial system.

From a purely technical perspective it's a really cool idea, though.
Title: Re: Business Proposal with HUGE potential - automated BTC->bitBTC bridge
Post by: luckybit on September 11, 2014, 12:50:04 pm
Hey friends,

It came to me while lieing in bed yesterday and thought there might be someone
feeling up to the challenge. So:
 - I will not implement this
 - someone else (with good reputation in crypto) can make ALOT of money

The idea was to set a automated BTC to bitBTC bridge that makes it easy for the
bitcoin community to get hands on bitBTC. All what follows should work aswell
for the ANY other altcoin that uses EC crypto from the satoshi client.

About the automation:
Assume I'd like to exchange 100 BTC from the bitcoin blockchain to 100 bitBTC
on the bitshares blockchain.  A provider can publish a (single) BTC address to
collect bitcoin in exchange for bitBTC.  Every single deposit into that address
comes with a bitcoin transaction containing at least one public key
corresponding to a sending address:

My address -> tx with 100 btc and pubkey to my address -> BTC address for exchange

Now that public key can be converted into a public key on the BitShares
network.  Thus, the BTC can be used to buy up bitBTC from the market (external
or internal) and the resulting bitBTC can be sent to an address
that corresponds (via TITAN) to the public key from the bitcoin network above.
Hence, I can redeem my bitBTC using the private key of my sender address.

If volume picks up, people might want to move into bitBTC (or bitPTS, bitPPC,
...) quickly. This options enables them to do so by paying a fee of say 3% to
the service provider.

The drawbacks:
 - a (trusted) entity needs to run this
 - that entity needs to be liquid on BTC and bitBTC (exchange able)
 - a service (server) needs to be coded and audited by the public to run this
   service.
 - the btc pubkey needs to be converted to btsx pubkey (code exists, needs testing)

So, if you think you can do it profitable, give it a shot. If I had any BTC I'd
be your first costumer :)

Thoughts?

If this could work can it be built into the Bitshares X GUI?  Maybe let the user configure their bridges but include default bridges?

I think this is possible with Counterparty and trustless to a certain extent.  Check out Vennd http://www.vennd.io/ .

Quote
vennd.io Services

Configured-to-order vending machines and gateways based upon your business requirements
Hosted vending machines based upon industry best practices
Counterparty and cryptocurrency consulting

How about you contact them?
Title: Re: Business Proposal with HUGE potential - automated BTC->bitBTC bridge
Post by: Riverhead on September 11, 2014, 12:53:39 pm
k can it be built into the Bitshares X GUI?  Maybe let the user configure their bridges but include default bridges?

I think this is possible with Counterparty to a certain extent.

That was my thought - it would be a part of the gui like we import keys now you could send the client BTC, PTS, etc. When you wanted to cash out you put your external public address in the client and it sends it via an asset server.
Title: Re: Business Proposal with HUGE potential - automated BTC->bitBTC bridge
Post by: luckybit on September 11, 2014, 12:55:47 pm
k can it be built into the Bitshares X GUI?  Maybe let the user configure their bridges but include default bridges?

I think this is possible with Counterparty to a certain extent.

That was my thought - it would be a part of the gui like we import keys now you could send the client BTC, PTS, etc. When you wanted to cash out you put your external public address in the client and it sends it via an asset server.

I think the easy way to go about it would be to work with Vennd. They have the exact technology necessary to create a cryptocurrency vending machine service. Input BTC -> Vennd --> Output BitBTC.

Bitshares X will require Vennd integration for this to work.

https://forums.counterparty.co/index.php?topic=404.0
Title: Re: Business Proposal with HUGE potential - automated BTC->bitBTC bridge
Post by: Riverhead on September 11, 2014, 12:57:12 pm
Maybe one day the client will support plug-ins and this sort of thing can be added/removed ad hoc. Though since the entire GUI uses RPC calls to talk to a standard CLI client there's no reason we won't start seeing many third part wallets. Wouldn't surprise me if Electrum got on board.
Title: Re: Business Proposal with HUGE potential - automated BTC->bitBTC bridge
Post by: luckybit on September 11, 2014, 01:01:05 pm
Maybe one day the client will support plug-ins and this sort of thing can be added/removed ad hoc. Though since the entire GUI uses RPC calls to talk to a standard CLI client there's no reason we won't start seeing many third part wallets. Wouldn't surprise me if Electrum got on board.

I think this functionality should be in the standard wallet. It's too critical and I don't think it should wait.

First they have to get interest working on BitAssets but the next thing to do should be to integrate Vennd.io. It doesn't require any plugins but you would need to use Counterparty to set up a vending machine. You would need to have a deposit address to that vending machine and a withdraw address to the users private key.

So why not do it the exact same way XBTC works? It already works in Counterparty and in Mastercoin. I know because I'm one of the original testers of both.

http://www.blockscan.com/order_book.aspx?f=2
Title: Re: Business Proposal with HUGE potential - automated BTC->bitBTC bridge
Post by: xeroc on September 11, 2014, 01:07:35 pm
you can already use btsx to get a bitcoin address to which you have access using the btsx priate key:
wallet_account_list_public_keys accountName
Title: Re: Business Proposal with HUGE potential - automated BTC->bitBTC bridge
Post by: luckybit on September 11, 2014, 01:11:38 pm
you can already use btsx to get a bitcoin address to which you have access using the btsx priate key:
wallet_account_list_public_keys accountName

Where does the Bitcoin address come from?
Can you explain that? Or are you saying somehow a Bitcoin wallet is built into Bitshares X?

I know some of us imported Bitcoin addresses but not everyone.
Title: Re: Business Proposal with HUGE potential - automated BTC->bitBTC bridge
Post by: xeroc on September 11, 2014, 01:19:12 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 :)
Title: Re: Business Proposal with HUGE potential - automated BTC->bitBTC bridge
Post by: luckybit on September 11, 2014, 01:22:15 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 :)

Okay but this still doesn't solve the problem. The problem is how to transfer value from point A to point B?

So if we want to transfer value from BitBTC onto Counterparty and then Vennd to BTC to a Bitcoin address is it possible? If it is possible wouldn't it also be possible to turn BitBTC into XBTC into BTC?

So we should start with a Counterparty Gateway to turn BitBTC into XBTC.
Title: Re: Business Proposal with HUGE potential - automated BTC->bitBTC bridge
Post by: xeroc on September 11, 2014, 01:31:23 pm
is the step through counterparty required to kill the need for trust? I am not firm with counterparty.. do the have contracts yet?
Title: Re: Business Proposal with HUGE potential - automated BTC->bitBTC bridge
Post by: jsidhu on September 11, 2014, 03:18:48 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)
Title: Re: Business Proposal with HUGE potential - automated BTC->bitBTC bridge
Post by: 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
Title: Re: Business Proposal with HUGE potential - automated BTC->bitBTC bridge
Post by: luckybit on September 11, 2014, 04:00:55 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.
Title: Re: Business Proposal with HUGE potential - automated BTC->bitBTC bridge
Post by: 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
Title: Re: Business Proposal with HUGE potential - automated BTC->bitBTC bridge
Post by: jsidhu on September 11, 2014, 04:13:31 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.
Title: Re: Business Proposal with HUGE potential - automated BTC->bitBTC bridge
Post by: xeroc on September 11, 2014, 04:15:45 pm
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!!!
Title: Re: Business Proposal with HUGE potential - automated BTC->bitBTC bridge
Post by: luckybit on September 11, 2014, 04:19:42 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
Title: Re: Business Proposal with HUGE potential - automated BTC->bitBTC bridge
Post by: xeroc on September 11, 2014, 04:20:22 pm
oh .. I am not doing it ..
I am offering the idea and maybe advice .. for free ... but I have other fish to fry :-)
Title: Re: Business Proposal with HUGE potential - automated BTC->bitBTC bridge
Post by: jsidhu on September 11, 2014, 04:45:45 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?
Title: Re: Business Proposal with HUGE potential - automated BTC->bitBTC bridge
Post by: GaltReport on September 11, 2014, 05:01:35 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.
Title: Re: Business Proposal with HUGE potential - automated BTC->bitBTC bridge
Post by: xeroc on September 11, 2014, 05:10:45 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 ..
Title: Re: Business Proposal with HUGE potential - automated BTC->bitBTC bridge
Post by: xeroc on September 11, 2014, 05:16:36 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
Title: Re: Business Proposal with HUGE potential - automated BTC->bitBTC bridge
Post by: jsidhu on September 11, 2014, 05:22:04 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?
Title: Re: Business Proposal with HUGE potential - automated BTC->bitBTC bridge
Post by: luckybit on September 11, 2014, 09:03:07 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.
Title: Re: Business Proposal with HUGE potential - automated BTC->bitBTC bridge
Post by: jsidhu on September 11, 2014, 11:07:17 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?
Title: Re: Business Proposal with HUGE potential - automated BTC->bitBTC bridge
Post by: zhangweis on September 11, 2014, 11:07:47 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.
Title: Re: Business Proposal with HUGE potential - automated BTC->bitBTC bridge
Post by: xeroc on September 12, 2014, 06:27:41 am
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 :-)  )