Author Topic: Easy stealth transfers  (Read 392 times)

0 Members and 1 Guest are viewing this topic.

Offline btsindex

Easy stealth transfers
« on: July 06, 2018, 04:32:41 pm »
I'm experimenting with a bot that could make confidential transfers much easier. Currently the only way to send assets anonymously is using command-line wallet and 1-2 extra blind accounts (http://docs.bitshares.org/bitshares/tutorials/confidential-transactions.html). The bot could automate such transfers and make them accessible without command-line wallet.

Instead of sending let's say 1000 BTS directly or via CLI, a sender transfers 1000 BTS to the bot account  providing a receiver address in the MEMO field (the same way as gateways work). The bot receives the assets, and sends them (minus the blockchain commission) to the receiver address using its own stealth account as a proxy.


Fig.1 Sending assets from Account1 to Account2 using the bot


Fig.2 Stealth transfer in receiver's Activity tab

What do you think about such bot? Is it like something people need? Are there plans to add confidential transfers to the bitshares UI? (it'd be awesome to have such feature built-in)
« Last Edit: July 06, 2018, 05:41:51 pm by btsindex »

Online Bangzi

  • Full Member
  • ***
  • Posts: 164
    • View Profile
    • Steemit: Bangzi
  • BitShares: bangzi
Re: Easy stealth transfers
« Reply #1 on: July 06, 2018, 10:18:56 pm »
The bot know where the money come from and where to go which no longer a confidential transfer.
Please Vote for My Witness: Bangzi
My Blog: https://steemit.com/@bangzi
请投票支持比特股见证人: Bangzi

Offline abit

  • Committee member
  • Hero Member
  • *
  • Posts: 3429
    • View Profile
    • Steemit Blog
  • BitShares: abit
  • GitHub: abitmore
Re: Easy stealth transfers
« Reply #2 on: July 06, 2018, 11:05:16 pm »
Why not deposit to an exchange then withdraw to another account  ;)
BTS account: abit
BTS committee member: abit
BTS witness: in.abit

Offline btsindex

Re: Easy stealth transfers
« Reply #3 on: July 07, 2018, 09:16:22 am »
The bot know where the money come from and where to go which no longer a confidential transfer.

You're right. Even if the bot or its owner (me) is honest and doesn't store anything server-side, there's a risk of being hacked. After getting access to the bot's private keys, it'll be possible to extract all the transfers with the sender/receiver info from the blockchain decrypting the MEMO field.

Another thing that concerns me a lot is 100% uptime. The cli-wallet i use as an RPC interface could crash or lost connection. Its function get_account_history that returns latest transactions has a limit of 100 elements. It means that if during downtime there'll be ≥101 transfers, some of them will be lost. DDOS-ing the bot account with lots of small transfers could have the same effect even with working cli-wallet. Probably a more sophisticated algorithm needed.

Why not deposit to an exchange then withdraw to another account  ;)

Great idea! Still risky and probably not 100% confidential, but it's the easiest way at the moment.

Thanks!
« Last Edit: July 07, 2018, 09:25:45 am by btsindex »

Offline abit

  • Committee member
  • Hero Member
  • *
  • Posts: 3429
    • View Profile
    • Steemit Blog
  • BitShares: abit
  • GitHub: abitmore
Re: Easy stealth transfers
« Reply #4 on: July 07, 2018, 09:05:08 pm »
Quote
Its function get_account_history that returns latest transactions has a limit of 100 elements.
Use get_relative_account_history.
BTS account: abit
BTS committee member: abit
BTS witness: in.abit

Offline armin

  • Full Member
  • ***
  • Posts: 90
    • View Profile
Re: Easy stealth transfers
« Reply #5 on: July 08, 2018, 03:15:59 am »
The bot know where the money come from and where to go which no longer a confidential transfer.

THIS

Offline armin

  • Full Member
  • ***
  • Posts: 90
    • View Profile
Re: Easy stealth transfers
« Reply #6 on: July 08, 2018, 03:16:35 am »
Why not deposit to an exchange then withdraw to another account  ;)

But someone can ask the exchange where the money was transferred, or they keep that private?

Offline btsindex

Re: Easy stealth transfers
« Reply #7 on: July 08, 2018, 07:31:00 am »
Use get_relative_account_history.

Thanks! There's no info about that function on http://docs.bitshares.org/api/wallet-api.html. I've found its description on github:

Code: [Select]
get_relative_account_history(string name, uint32_t stop, int limit, uint32_t start) const

Example:
unlocked >>> get_relative_account_history account-name01 0 10 10
Source: https://github.com/bitshares/dev.bitshares.works

The problem is cli_wallet returns nothing after such command:

Code: [Select]
get_relative_account_history bts-index 0 10 10

get_account_history works as expected

Code: [Select]
unlocked >>> get_account_history bts-index 10
2018-07-08T07:11:18 asset_publish_feed_operation bts-index fee: 0.00057 BTS
2018-07-08T07:11:06 asset_publish_feed_operation bts-index fee: 0.00057 BTS
2018-07-08T07:07:15 asset_publish_feed_operation bts-index fee: 0.00057 BTS
...
« Last Edit: July 08, 2018, 07:41:52 am by btsindex »

Offline abit

  • Committee member
  • Hero Member
  • *
  • Posts: 3429
    • View Profile
    • Steemit Blog
  • BitShares: abit
  • GitHub: abitmore
Re: Easy stealth transfers
« Reply #8 on: July 08, 2018, 08:09:16 am »
Use get_relative_account_history.

Thanks! There's no info about that function on http://docs.bitshares.org/api/wallet-api.html. I've found its description on github:

Code: [Select]
get_relative_account_history(string name, uint32_t stop, int limit, uint32_t start) const

Example:
unlocked >>> get_relative_account_history account-name01 0 10 10
Source: https://github.com/bitshares/dev.bitshares.works

The problem is cli_wallet returns nothing after such command:

Code: [Select]
get_relative_account_history bts-index 0 10 10

get_account_history works as expected

Code: [Select]
unlocked >>> get_account_history bts-index 10
2018-07-08T07:11:18 asset_publish_feed_operation bts-index fee: 0.00057 BTS
2018-07-08T07:11:06 asset_publish_feed_operation bts-index fee: 0.00057 BTS
2018-07-08T07:07:15 asset_publish_feed_operation bts-index fee: 0.00057 BTS
...
The effective alternative call for "get_account_history bts-index 10" in the wallet is
Code: [Select]
get_relative_account_history bts-index 0 10 0

But for more information, you need to read the documents: https://bitshares.org/doxygen/classgraphene_1_1app_1_1history__api.html#ad2ee92d31ed8ac2da1ec7f074ae018be

Or, in the wallet, type
Code: [Select]
gethelp get_relative_account_history
PM me your Telegram handle, I'll invite you to the dev channel.
BTS account: abit
BTS committee member: abit
BTS witness: in.abit

Offline abit

  • Committee member
  • Hero Member
  • *
  • Posts: 3429
    • View Profile
    • Steemit Blog
  • BitShares: abit
  • GitHub: abitmore
Re: Easy stealth transfers
« Reply #9 on: July 08, 2018, 08:13:31 am »
Use get_relative_account_history.

Thanks! There's no info about that function on http://docs.bitshares.org/api/wallet-api.html. I've found its description on github:

Code: [Select]
get_relative_account_history(string name, uint32_t stop, int limit, uint32_t start) const

Example:
unlocked >>> get_relative_account_history account-name01 0 10 10
Source: https://github.com/bitshares/dev.bitshares.works

The problem is cli_wallet returns nothing after such command:

Code: [Select]
get_relative_account_history bts-index 0 10 10

get_account_history works as expected

Code: [Select]
unlocked >>> get_account_history bts-index 10
2018-07-08T07:11:18 asset_publish_feed_operation bts-index fee: 0.00057 BTS
2018-07-08T07:11:06 asset_publish_feed_operation bts-index fee: 0.00057 BTS
2018-07-08T07:07:15 asset_publish_feed_operation bts-index fee: 0.00057 BTS
...

Also in the github link you provided there are more info about how to use the command.
https://github.com/bitshares/dev.bitshares.works
Can you please read it again?
BTS account: abit
BTS committee member: abit
BTS witness: in.abit

Offline btsindex

Re: Easy stealth transfers
« Reply #10 on: July 08, 2018, 10:49:38 am »
The effective alternative call for "get_account_history bts-index 10" in the wallet is
Code: [Select]
get_relative_account_history bts-index 0 10 0

Yes, that works. The thing is, it's still impossible to get > 100 transactions. To get more, i need to change start/stop values, and load transactions recursively. When those values ≠ 0, the function returns nothing (empty array when called via rpc)

Anyway, Bangzi was right. The bot solution is not 100% confidential. A person who owns the bot's private keys, can get all information about senders and receivers. It's not ok, so i think it'd be better to wait until such functionality implemented in official UI (creating users' own blind accounts, blind transfers etc..). Until then, it's better to use cli_wallet.

Thanks for your help!

Offline abit

  • Committee member
  • Hero Member
  • *
  • Posts: 3429
    • View Profile
    • Steemit Blog
  • BitShares: abit
  • GitHub: abitmore
Re: Easy stealth transfers
« Reply #11 on: July 08, 2018, 01:50:26 pm »
Quote
When those values ≠ 0, the function returns nothing
Because you're not connecting to a full-full node which is tracking all history entries of the querying account. That means old entries were removed from RAM thus unable to fetch with that API.

Just saying, if you really want to start a business, you need to run your own node to track more entries. https://github.com/bitshares/bitshares-core/wiki/Memory-Reduction-for-Nodes
BTS account: abit
BTS committee member: abit
BTS witness: in.abit