DEV Community

loading...

Mining cryptocurrencies instead of having ads?

sabatesduran profile image Dídac Sabatés ・2 min read

Today I saw a tweet from @ben that had a dev.to link talking about ads that made me remember something that I saw some weeks ago:

Liquid error: internal

Coinhive

Coinhive offers a Javascript API for mining a cryptocurrency called Monero in your own website so instead of having a tons of ads you ask for some processing power for mining to the user.

Concepts (I got this from their website):

  • Captcha: We offer an easy to implement captcha-like service where users need to solve a number of hashes (adjustable by you) in order to submit a form. This prevents spam at an inconvenience that is comparable to a classic captcha. All with the added benefit of earning you money.

  • Shortlinks: If you have an URL you'd like to forward your users to, you can create a cnhv.co shortlink to it. The user has to solves a number of hashes (adjustable by you) and is automatically forwarded to the target URL afterwards.

  • Javascript API: If you don't like the captcha or shortlinks for whatever reason, nothing is stopping you from implementing your own solution on top of our API.
    The JavaScript API let's you associate solved hashes to specific users on your site. Users can solve hashes on your behalf in return for benefits you provide.


I think this super interesting in captcha and short links but I would not like it that much if all my tabs are mining at the same time.

Do you think that this will become the new ads?

Do you know some potential problems that we could encounter as users?

Please share your opinion.

Discussion (14)

pic
Editor guide
Collapse
ben profile image
Ben Halpern

Interesting... I'm going to give this a lot of thought. This is so off the wall, I'm not quite sure how I feel. I'll let it sink in, and would love to read more opinions.

Collapse
valtism profile image
Dan Wood

As far as I know, it is very difficult to make any money at all with crypto mining, as the computing power required to mine a significant amount is far too high.

I don't like mining crypto as an alternative to ads in the first place because of the impact that they have on battery life of my devices. Losing an hour of battery from visiting a site seems like a higher price to pay then viewing even an annoying ad.

Collapse
jess profile image
Jess Lee (she/her)

@peter I’m specifically interested in your opinion on this

Collapse
mortoray profile image
edA‑qa mort‑ora‑y

Sites, and networks, that abuse the end-user's computer should, and will, rightfully by labelled as malware. They will be aggressively blocked, and hopefully filtered out by search engines.

This is a shady practice that disrepects the user's equipment, costs the user money, and is bad for the environment.

It's like a mall that robs of you your wallet when you enter for fear that you might not enter any of the stores.

Collapse
jpenuchot profile image
Jules Pénuchot

Mining currencies using JS scripts is incredibly inefficient (not just because JS is slow but also because it can only run on CPU, and CPUs are incredibly slow at solving hashes) and crypto-mining is already a huge waste of energy. It would just drain our devices' batteries, increase overall energy consumption, without even generating decent revenues for website holders.

Collapse
bushwald profile image
Brad • Edited

I'd prefer easy micro-payments in the form of mining that don't require any financial info from me over brainwashing via ads. I'm curious if there are any API's in development that would do the mining on the gpu, rather than cpu, like WebGL. Wouldn't that solve some of the concerns about efficiency?

Collapse
tachyon profile image
Flavius • Edited

I've created an implementation of crypto mining into my game, it's a pretty nifty feature and the community seems to enjoy it. I've done some research, and it won't be flagged or ad-blocked unless you do not disclose this to the users.

thepracticaldev.s3.amazonaws.com/i...

Collapse
shell profile image
Vladimir Penkin

As multiple commenters pointed crypto-mining on user's computers have multiple problems but it doesn't mean that it can't be solved people! We in the beginning of something new and nobody knows all the right answers yet.
But if I have to choose I would choose mining instead of ADs.
Maybe because they haven't worked for me in particular and I find them stupid.
And as we found with journalism, there are 2 parts of the equasion.

  1. Journalists want to be paid fairly for professionalism
  2. People mostly not ready to spend bucks for each site they read, specially that is there are plenty of other sources. Hence we have ADs. But they are not ideal as well. Something we saw on the example of youtube and ADpocalypse, or native advertisements or any other number of problems using ADs.

So my vote is YES, I'm ready to share resources of my computer(electricity, idle time, disk space, whatever, network bandwidth) to "pay" for quality content.

Collapse
therufa profile image
Attila Max Ruf

i think crypto mining is good, because it creates a market for revoltionizing the way we produce electricity. if there's a problem it needs to be solved, not avoided.

i would be happy to support the pages i visit using crypto mining, especially those media that hide content unless ad blockers are disabled

Collapse
rhymes profile image
rhymes

I'm thinking about this:

"Bitcoin Mining Now Consuming More Electricity Than 159 Countries Including Ireland & Most Countries In Africa"

powercompare.co.uk/bitcoin/

so my answer would be "sorry but no" :-)

Collapse
stefandorresteijn profile image
Stefan Dorresteijn • Edited

So I had the idea of building a YT-like site without ads, and the site would mine crypto for the content creator. Unfortunately, you need more hashing power to make it worth anything. Ads just tend to make you a lot more money.

Collapse
rip profile image
Rip

I think the massive drain of battery & resources without consent will probably be a turn-off for the majority of users. They'll either use adblock to block this or just avoid sites that use coinhive. I do see this being a good opt-in alternative for ads for the minority of users that'll be OK with it. If that fits economically then I don't really see a reason not to offer that option to users.

Collapse
leslie_bruder profile image
Leslie Bruder

Coinhive is blocked by virus scanners - or at the very least AVG and Avast blocks the background version, something I feel you'd run into a lot more than ad blockers.

Another issue is the site (i.e user) can control how much CPU usage the miner uses, which in theory seems fine but could result in abuse that deeply affects the end user, and could even start to affect sites if people start using script blockers religiously again

Collapse
nektro profile image
Meghan (she/her)

This practice and API has already been blocked my all the ad blockers, labeled as malware by most AV, and will probably get you blacklisted on search engines