|
Rule1: Input-output differential rule
In bitcoin wallet transactions, the sum of the input's wallets must be equal to the total amount of the output, except for the miner fee. To distinguish a wallet generated for storing the balance but not a wallet-to-wallet transaction, we remove the wallet with the smallest amount on the input side. If the rest of the total amount of wallet on the input side is still less than the largest wallet on the output side, it means that all the wallets on the input side have to pay to the largest wallet on the output side. In other words, there are no extra wallets on the input side to conduct a wallet-to-wallet transaction with the wallets on the output side. Therefore, if there exists a wallet on the output side rather than the largest wallet, it should be the change wallet. We use this rule to exclude any possibilities that the change wallets receive bitcoin from the input wallets.
Rule 2: Temporary rule
The primary function of the change wallet is to store the difference between input and output. Therefore, there is usually no previous transaction records before the change wallet is generated. Thus, there should usually be two transactions for the change wallets, the first one is the transaction to generate the change wallets, and the second one is the transaction to empty the change wallet for importing the remaining value to the main wallet. Therefore, we implement rule 2 to detect the wallets, which only have two transactions as the change wallets. |