BitShares Forum
Main => General Discussion => Topic started by: btsindex 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 (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.
(https://i.imgur.com/P7Q3mNo.png)
Fig.1 Sending assets from Account1 to Account2 using the bot
(https://i.imgur.com/jYcQsRI.png)
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)
-
The bot know where the money come from and where to go which no longer a confidential transfer.
-
Why not deposit to an exchange then withdraw to another account ;)
-
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!
-
Its function get_account_history that returns latest transactions has a limit of 100 elements.
Use get_relative_account_history.
-
The bot know where the money come from and where to go which no longer a confidential transfer.
THIS
-
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?
-
Use get_relative_account_history.
Thanks! There's no info about that function on http://docs.bitshares.org/api/wallet-api.html (http://docs.bitshares.org/api/wallet-api.html). I've found its description on github:
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 (https://github.com/bitshares/dev.bitshares.works/blob/2be2a7267cb1f98260d8cdd06d17134f34bb6021/core/knowledge_base/research/irreversible_op_check.md)
The problem is cli_wallet returns nothing after such command:
get_relative_account_history bts-index 0 10 10
get_account_history works as expected
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
...
-
Use get_relative_account_history.
Thanks! There's no info about that function on http://docs.bitshares.org/api/wallet-api.html (http://docs.bitshares.org/api/wallet-api.html). I've found its description on github:
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 (https://github.com/bitshares/dev.bitshares.works/blob/2be2a7267cb1f98260d8cdd06d17134f34bb6021/core/knowledge_base/research/irreversible_op_check.md)
The problem is cli_wallet returns nothing after such command:
get_relative_account_history bts-index 0 10 10
get_account_history works as expected
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
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
gethelp get_relative_account_history
PM me your Telegram handle, I'll invite you to the dev channel.
-
Use get_relative_account_history.
Thanks! There's no info about that function on http://docs.bitshares.org/api/wallet-api.html (http://docs.bitshares.org/api/wallet-api.html). I've found its description on github:
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 (https://github.com/bitshares/dev.bitshares.works/blob/2be2a7267cb1f98260d8cdd06d17134f34bb6021/core/knowledge_base/research/irreversible_op_check.md)
The problem is cli_wallet returns nothing after such command:
get_relative_account_history bts-index 0 10 10
get_account_history works as expected
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 (https://github.com/bitshares/dev.bitshares.works/blob/2be2a7267cb1f98260d8cdd06d17134f34bb6021/core/knowledge_base/research/irreversible_op_check.md)
Can you please read it again?
-
The effective alternative call for "get_account_history bts-index 10" in the wallet is
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!
-
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