PIVX-Project / PIVX

Protected Instant Verified Transactions - Core wallet.
https://www.pivx.org
MIT License
528 stars 716 forks source link

[Cold Staking][GUI] Confusing Stake Delegations #1270

Open CaveSpectre11 opened 4 years ago

CaveSpectre11 commented 4 years ago

Describe the issue

When combining delegation from a staker wallet to an external owner wallet; the transaction shown in the wallet is confusing. This issue is meant to document the discussion I had on this issue with @random-zebra and @furszy. Personally this is not a high priority issue, however it may lead to confusion as more users use ledgers for staking.

Can you reliably reproduce the issue?

Yes.

If so, please list the steps to reproduce below:

  1. Create a cold staking address
  2. delegate coins to with the cold staking address to an external owner address (like a ledger)

Expected behavior

The expected behavior in general is to reflect the transfer of ownership that occurred during delegation. The action of above creates a transaction that sends the coins to the owner address and ties it to the cold staking address. Since the wallet "owns" the cold staking address, but is no longer the "owner" of the coins themselves, the confusion occurs.

If possible, two transactions should be shown. One, in red, showing the transfer from the one wallet to the other, and another (in gray) showing the receipt of the delegation.

The actual "expectation" is fluid, and implementation shouldn't be limited to any given expectation aside of providing a way for the wallet to display that the coins were deducted from their available balance.

Actual behavior

Stake Delegation shows as a negative transaction, for the transaction fee. This is because the transaction is recorded as a transfer of the coins away, deduction of fees, and receipt of the delegation. -coins - fees + coins = -fees.

Screenshots.

Delegation image

furszy commented 4 years ago

Hmm, this is a tricky one to show in the UI.

The single tx split in two (or more) gui records will cause more confusion, each record is presented in a single row and represents a single unique tx. If we split the utxo, the tx detail would have the same id, as well as the exact same information.

Plus, will make regular users think that those were two txs instead of utxo.

And would be the only case, which would be interpreted more as a bug than a feature.

I'm a nack for that option.


What would do is create a new type for this transaction and create a custom row showing both amounts and showing an specific name/explanation for this transaction.

Amount to show:

1) the outgoing amount: delegated amount + change + fee. ---> red.

2) incoming delegation contract: delegated amount. ---> gray (or any other color that represents a delegation contract. --- with the exception of purple, we should use it for an annonymous tx and not for this).

In this way we continue following the single row per tx architecture and focus on a new row layourt presenting this properly.

divinationstar commented 4 years ago

Is there a memo field for a transaction that could be displayed? If yes, a user can enter "cold stake" and it can show in row of transaction.