Have you read the discussion about Metamask Snaps? Have you thought about how the app will generate PoW?
Thank you; I just read through that discussion. Some good points were raised by Vilkris.
Regarding conducting Proof of Work from a web app, I believe it’s possible with RandomX. In the FAQ, it states: ‘Web mining is infeasible due to the large memory requirement and the lack of directed rounding support for floating-point operations in both Javascript and WebAssembly.’
Here are two points to consider:
- We are not aiming to conduct mining.
- Rounding can be emulated in software but will be very inefficient.
For economically feasible mining, efficiency is a crucial consideration. However, when using PoW against transaction spam and as a proxy for network utilization, the efficiency of the hashing calculations is not as important. Additionally, the difficulty adjustment dynamic is also different.
In Monero, for example, the hash rate of the network determines the difficulty, and miners are incentivized to add hash rate by being able to mint coins.
In Zenon, however, network utilization determines the difficulty. Transactors are disincentivized to use PoW by longer wait times as network utilization increases and are instead incentivized to fuse QSR for plasma.
I would estimate that the PoW calculations on the web app would take something like 10 - 20x longer than in Syrius. So maybe a transaction that would require 30 seconds of hashing with Syrius might take 7 minutes with the web app.
This is where the Gravity | Zero-Gravity UI guides the user towards holding QSR. I think adding a staking function into the web app will be useful too, especially considering there is no easy way to buy QSR.
If someday we can make QSR dynamic as well, this will work out very well for all fusers.
Regarding RandomX I remember a crypto rave project organised in Geneva and you had to mine XMR to get your tickets. It was years ago though, can’t find the website back.
You also need to take light mode and fast mode into consideration. Fast mode requires at least 2 GiB RAM which is not possible in a browser. There’s around a 5x difference between the modes based on my testing. If Syrius is running in fast mode, then the difference in speed becomes 50-100x, assuming your estimation of 10-20x is correct.
I would start with a PoC to prove that RandomX plasma PoW can be computed within a reasonable time in a browser before basing any decisions on that assumption. I doubt it will be fast enough to be a viable option and not worth the additional complexity it introduces.
That estimation was based on one Reddit comment I read, but I have since read more about it and seen reports of it being significantly slower than that.
I guess it depends on the difficulty, what the baseline is, and how it ramps up with demand. But either way, it seems like it may be a pain to run in the browser if a transaction could take hours when the difficulty even slightly ramps.
Maybe @1776’s suggestion of a PWA could be a better solution, as they have more access to hardware, I think. Not too sure, will look into it and do some testing.
“first store” in Kenya accepting $kas. You should check out their mobile wallet. It’s not very good.