Six Confirmations not required when received from MWEB

Hi - Previously before Cake integrated MWEB, I would send from an MWEB in my Litecoin core to Cake and would be able to spend the coins after one confirmation. This is also true with Stack Wallet.

Since the introduction of MWEB to cake it seems you guys are following the protocol standard to wait for 6 confirmations before coins can be spent. This is just a soft limit and not actually enforced unless going from ltc → MWEB or MWEB → MWEB but not enforcible going from MWEB → ltc as I have done it many times in the past and can still do it in stack.

Screenshot below

1 Like

Please disregard this message if you haven’t already. I tested it last night in stack and yes 6 confs is a hard limit. I was mistaken. Sorry about that fellas

1 Like

Okay nevermind. I did some research. Please see LIP-0003. This was a peg-in from the canonical chain after 1 confirmation.

Per Peg-In Transactions (lips/lip-0003.mediawiki at master · litecoin-project/lips · GitHub) there is no 6 confirmation requirement to peg-in to the extension block (MWEB).

Also, per the same section, there is no 6 block requirement for the pegged-in coins as there is no time lock. So, peg-in can be spent immediately after confirmed.

However, per Peg-Out transactions (lips/lip-0003.mediawiki at master · litecoin-project/lips · GitHub) there is a 6 confirmation lock of the UTXO on the canonical chain.

I think changing the restrictions in Cake will improve litecoin UX.

1 Like

I did some tests with Litecoin core:

  • I could Peg-in (send to MWEB) after 1 confirmation
  • I could spend Pegged-In (MWEB) coins either to another MWEB address or back to the canonical chain after 1 confirmation.
  • Coins sent from MWEB-> Canonical chain (Peg-out) have a 6 confirmation lock and are considered “Immature” by core until then.

Thanks for sharing. This will looked into an modified accordingly.

2 Likes

Looks like the criteria was updated. I pegged out from an mweb utxo that only had 4 confs. Havent tried the other routes, but my guess is its all been updated.

1 Like

Spoke too soon. Still cant peg in to mweb after 1 conf.

1 Like

Still an issue. This was peg in with 3 confs

As I mentioned Litecoin core allows me to move to mweb after one conf move from mweb to mweb after 1 conf and move pegged out from mweb after 6 confs

2 Likes

Just wanted to share that a fix has been developed here:

Hopefully it will appear in a version of Cake soonish.

3 Likes

Amazing work. I don’t pretend to know much about Cake wallet’s codebase but the PR looked clean and simple. Ty!

1 Like

Cake Team have been amazing and the fix is already in the new v5.7.0 app. Please test the fix and report if it’s now satisfactory.

2 Likes

Kindly let me know if as @hector says, reported issue is taken care of with pull request in question, that way we can close thread and mark it as solved here. Thanks! :folded_hands:

2 Likes

I haven’t yet had time to test it, but I will in the next couple of days and let you know on here.

2 Likes

Just tested it tonight. Could Peg in after 1 conf and could also send from the pegged in mweb after 1 conf.

Great work @hector

Thanks for this. You can close the thread now :blush:

1 Like