Skip to main content

Stealth transactions. How it works.

A bit of theory

First, let’s understand what stealth transactions are in the blockchain based on the Graphene engine. Imagine that Alice wants to secretly send Bob some money inside the blockchain, so that no one but them could see it. To do this both of them must go through some sequence of actions:

1. Bob creates a private account, and shares (through an independent communication channel) the public key with Alice as a proof that this account belongs to him. This account is NOT STORED within the blockchain, but ONLY in the cache of an existing browser’s session at a given time;

2. Alice creates a private contact of Bob’s private account with the public key of Bob’s private account (it is quite complicated but it’s necessary!);

3. Alice sends a stealth transaction to this private contact and transmits the resulting confirmation key to Bob via the independent communication channel. The blockchain only records the fact that Alice made a stealth transaction;

4. Through an independent communication channel Bob receives a confirmation key to decrypt the stealth transaction and withdraws funds from stealth to his public account. The blockchain is recorded the fact of receipt by Bob of the stealth transaction (sender remains unknown).

Stealth transactions mechanism is somewhat similar to the work of such a simple local smart contract. It can also be compared to the trade and delivery of goods through the automatic post office (Postamat) with the only notice – in the Graphene blockchain it is not possible to find and open your cell by a third party.

Current Commissions

It should be understood that the commission is paid twice, both by the sender and the recipient. Each of the transfer TO blind and transfer FROM blind operations within the blockchain are two essentially separate operations that are played at DIFFERENT time.

The first commission is paid from the sender’s balance. It is hard-wired in code and is approximately 110.3643 DEEX.

The second commission is deducted from the received amount and is equivalent by core_exchange_rate is 110.3643 DEEX. This commission is paid in the stealth transaction’s used asset.

Example: Alice wants to send Bob 10 BTS via DEEX.EXCHANGE. Alice pays 10 BTS+ ~23 BTS (pre-paid commission on receipt) + 110.3643 DEEX (commission on sending). Thus, in the stealth transaction is laid ~33 BTS. After receiving the necessary information Bob unpacks the stealth transaction and receives ~33-23=10 BTS.

Moving on to practice

Important notice! Read it carefuly!

Stealth transactions are cached locally ONLY! When you log out or refresh the page there is a huge chance to lose the transferred funds!

Below an experiment in TWO OPEN versions of the browser is shown. Because if you want to check the work of stealth transactions TWO TABS of the same browser will not work, because the logic of stealth transactions looks at the same WebSQL base.

The sequence of actions is the following.

1. Bob enters (logs in) to deex.exchange and clicks on the new Stealth option in its wallet’s interface.

2. Bob creates a private account with any name (this name is only necessary to ensure that Bob himself is not confused).

3. Bob copies his public key of the newly created private account.

4. Bob sends this public key to Alice via the independent communication channel (for example, through the messenger used by both of them).

5. After receiving Bob’s public key Alice creates his private contact. To do this she logs in her deex.exchange’ account and clicks on the Stealth button.

6. Alice creates Bob’s private contact with his public key (the name is necessary in order not to get confused).

7. Alice clicks on the created contact’s name.

8. And then on the send transaction option.

9. Alice fills in the transaction’ amount (remember about 10+~23 BTS)

The Send button can be looked such a way for a long time until the transaction is being initialized.

10. Alice copies the confirmation key to “unpack the stealth”.

11. And sends it to Bob.

12. After receiving confirmation from Alice Bob clicks on his private contact.

13. And then on receive transaction option.

14. After clicking on approve, Bob will have your balance field and a new transaction. Bob clicks on Send Transaction (in this case, Send means to send money from Stealth to a public account. Bob can transfer them to someone else or specify own account to get them by himself).

15. Clicking on the Maximum amount Bob will see the amount of Stealth with deduction of the Commission (23 BTS). After specifying his account, he sends the transaction to himself.

16. …and see how his balance was replenished from an anonymous source 🙂

In the Activity we see blind transfer

That’s it!

Leave a Reply

Login with: