Hi guys, im trying to find an explanation about onchain unlocks for when there is a malicious node. Basically the scenario is when a node sends wrong information during settlement.
-Alice is a malicios node willing to cheat someone.
-Alice sends a payment to Bob, but never gives him the balance proof. She then closes the channel.
-Bobs sends the secret, in order to claim the tokens Alice chain. He doesn’t have any balance proof, so this is the only way.
-But Alice counts 500 blocks before him, and settles the channel with empty locks root, meaning no transaction was registered on chain
When Bob tries to unlock those tokens, the computed merkle root is not the same as the one sent by Alice:
(computed_locksroot, unlocked_amount) = getMerkleRootAndUnlockedAmount(
// The sender must have a non-empty locksroot on-chain that must be
// the same as the computed locksroot.
// Get the amount of tokens that have been left in the contract, to
// account for the pending transfers
unlock_key = getUnlockIdentifier(channel_identifier, sender, receiver);
UnlockData storage unlock_data = unlock_identifier_to_unlock_data[unlock_key];
locked_amount = unlock_data.locked_amount;
// Locksroot must be the same as the computed locksroot
require(unlock_data.locksroot == computed_locksroot);
So its fails in the final line of aboves code. Preventing Bob from receiving the tokens.
So.. i want to know if the unlock is related with this scenario or not. I found important that when a node cheats on the settlement data, the other node can recover it founds.
Ok, now an usability question. :)
I joined a token network and I got a channel opened with another participant. I then left the token network (calling DELETE on the token network address). The channel went into closing immediately (expected) and closed after a while (settle timeout?)
What I can not see neither through the API or even the UI is what happened with the tokens that were on the channel. They are not back on my account - balance has not been updated - so I am guessing they are on the UDC? The API does not indicate in any way on what block I should expect to have the funds back.
Also: if they are on the UDC, how can I withdraw to my account? Will the funds be used if I re-join the network?
Ah, so this is another thing that was unclear for me. I was under the impression that UDC would hold any token while settlements were open and that services could collect RDN from them. Thanks for clarifying that.
So I guess is just an usability issue? At the moment as an user all I am in the UI is that the channel is marked as "closed" (which now I understand that it means that it hasn't been settled yet), but I am not seeing the funds back and no kind of message indicating when (time or blockwise) they should be back to my account - which can give some sort of anxiety.
raiden_1 | 2020-09-15 09:19:33.280111 [info ] Received new balance proof, creating message for Monitoring Service. [raiden.services] balance_proof=BalanceProofSignedState< nonce: 13 transferred_amount: 310000000000000000 locked_amount: 120000000000000000 locksroot: 0x700d5bd5a5697965751a2749e0a0a83a0cb1de62abf0a3f3cf76320e1a4bfefc message_hash: 0x2ccb16cc5439e85b51a3b7a97e7787a8a3762975cded3e80a0bb2a067855ae70 signature: 0x5c6787becd98940ccd0b0259db2dd497ba673732bdc3b1e00519c8c1dde11995159e77ca003fc014cb71f708e90c4bb8db5b8940deed77d40870cc52a4c64bed1c sender: 0x9D527BFBF56420ae45f57D79D19060F34957808a canonical_identifier: CanonicalIdentifier(chain_identifier=5, token_network_address=0x812650FB6Acdf9dD47E631cBB5518B32FFD4D129, channel_identifier=67) balance_hash: 0x4f65c2be3f847edb76bd016e4218e741a16d7cba45dddebddc514e135f9bea8b > greenlet_name=GMatrixClient.message_worker user_id:@0xd09a21634b70378a847d9ab61c77d90c43805264:transport.transport04.raiden.network node=0xD09A21634b70378a847d9aB61c77D90C43805264 raiden_1 | 2020-09-15 09:19:36.111005 [info ] Synchronizing blockchain events [raiden.raiden_service] blocks_per_second=0.06286153873778143 elapsed=15.907978393137455 greenlet_name=AlarmTask._run node:0xD09A21634b70378a847d9aB61c77D90C43805264 remaining_blocks_to_sync=0 to_block=3406203
@sahar-fehri The 60% are deposited in newly created channels. They can be used to pay each of the channel partners, but they can also be used to pay others if the channel partners are online and have other channels themselves. In that case they will act as mediators and forward your payment to the target. This is one of the main points of raiden.
The other 40% are kept in the wallet at first and are used to deposit into channels when other nodes open a channel to you.
@karlb thank you for your response.
Is there a guide to transfer the $UNI from the Raiden Address back to the original ETH address please?
The closest issue I can find somewhat related : raiden-network/raiden-wizard#131
~/.ethereum/keystoreon Linux or
/Library/Ethereum/keystoreon Mac. There is an
addressproperty in every keystore file, that you can check. If you have a lot keystore files in the folder you can try finding by writing a little script. If you have problems with this, please let me know.