keep-network / tbtc-dapp

Deposit BTC and redeem TBTC
http://dapp.test.tbtc.network/
MIT License
33 stars 31 forks source link

Improve UI/UX by preventing or warning users when there are insufficient signer bonds to cover deposit refunds #259

Open culgin opened 4 years ago

culgin commented 4 years ago

Description:

The UI should warn or prevent users from initiating a deposit when there are is sufficient signers.

As shown in the transaction below, gas fees were incurred when a deposit is initiated but subsequently rejected by the smart contract. https://ropsten.etherscan.io/tx/0xc6af32241decdc2e6a71a21fd47e6bce0b0d4db312829fcb1aa4ff3317ce1da5

A better UX will be to prevent this from happening or at least show a prominent warning that this transaction is bound to fail.

Steps to reproduce the behavior:

1) Go to tBTC minting dapp 2) Initiate a tBTC minting request 3) On step 2, "Initiating Deposit". An error is shown on Metamask but not on the page UI. Users may just proceed with the transaction and rejected at the smart contract.

Screenshots:

image

image

image

Shadowfiend commented 4 years ago

This is actually different than having insufficient signers. In the rare case that signers fail to properly form the signing group, the depositor (i.e., you) can claim a refund of the payment made to open the deposit. This revert happens when the bond the deposit requires from the signers is not enough to cover that refund. Rather than allow you to open a deposit you might not get refunded for, we quit early.

I adjusted the title accordingly; the core point of having a clearer error earlier sooner in the flow is still absolutely valid.

culgin commented 4 years ago

This is actually different than having insufficient signers. In the rare case that signers fail to properly form the signing group, the depositor (i.e., you) can claim a refund of the payment made to open the deposit. This revert happens when the bond the deposit requires from the signers is not enough to cover that refund. Rather than allow you to open a deposit you might not get refunded for, we quit early.

I adjusted the title accordingly; the core point of having a clearer earlier sooner in the flow is still absolutely valid.

Thanks for the clarfication!