Author Topic: Business Proposal with HUGE potential - automated BTC->bitBTC bridge  (Read 6469 times)

0 Members and 1 Guest are viewing this topic.

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
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 :-)  )

Offline zhangweis

  • Sr. Member
  • ****
  • Posts: 305
    • View Profile
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:http://weibo.com/zhangweis

Offline jsidhu

  • Hero Member
  • *****
  • Posts: 1335
    • View Profile
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

Offline luckybit

  • Hero Member
  • *****
  • Posts: 2921
    • View Profile
  • BitShares: Luckybit
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.
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

Offline jsidhu

  • Hero Member
  • *****
  • Posts: 1335
    • View Profile
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?
« Last Edit: September 11, 2014, 05:46:02 pm by jsidhu »
Hired by blockchain | Developer
delegate: dev.sidhujag

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
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

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
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 ..
« Last Edit: July 31, 2019, 08:46:28 am by xeroc »

Offline GaltReport

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.

Offline jsidhu

  • Hero Member
  • *****
  • Posts: 1335
    • View Profile
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

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
oh .. I am not doing it ..
I am offering the idea and maybe advice .. for free ... but I have other fish to fry :-)

Offline luckybit

  • Hero Member
  • *****
  • Posts: 2921
    • View Profile
  • BitShares: Luckybit
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
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: 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!!!

Offline jsidhu

  • Hero Member
  • *****
  • Posts: 1335
    • View Profile
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

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
but if you make a profit from it you need to pay tax ... better clear this out with your local gov first

Offline luckybit

  • Hero Member
  • *****
  • Posts: 2921
    • View Profile
  • BitShares: Luckybit
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.
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads