What is the difference between Dogecoin and Bitcoin at the network level? With all the Dogecoin hype, mainstream media has been comparing Doge with established cryptos like Bitcoin.
I'm trying to understand the difference at the technical level:

It comes up that Bitcoin network has better security. Is that due to the hashrate? If more miners start switching to Doge, wouldn't that solve the problem?

Doge's codebase is also almost same as Bitcoin.


Ignoring the coin supply factor, where Doge can continue creating 5 billion coins per year, is there any other reason that the Bitcoin network is superior? Does it boil down to simply which network gets more adoption?
TL;DR: small code differences, but many larger ecosystem differences
IIRC, Dogecoin is a fork of Luckycoin, which in turn was forked from Litecoin, which was forked from Tenebrix, which was forked from Bitcoin. As far as I can tell, the main differences to Bitcoin are:

scrypt hashing algorithm
1 minute block interval
accelerated reward schedule:
Full supply emission in less than 2 years via random rewards, then later changed to have a constant tail emission of 10,000 Doge per block.

Dogecoin is merge-mined with Litecoin, so it shares the protection of the hashrate of the incumbent Scrypt-coin and is therefore not trivially majority-attackable as some other minority-hashrate forks. Since Litecoin/Dogecoin use a different hashing algorithm (Scrypt) than Bitcoin (SHA256d), mining hardware does not transfer, it is only compatible with one or the other.
Presumably, people citing security concerns are alluding to Dogecoin Core being about 15,000 commits behind Bitcoin Core, with its master release citing inclusion of &quot;changes from Bitcoin Core 0.14.3&quot; (which was released in Sep 2018). I surmise that this means that a plethora of security fixes and performance improvements have not yet been backported to Dogecoin. The Dogecoin network has only about 220 public nodes at chain-tip. Allegedly, the software is struggling to synchronize the 3.7M block headers.
Dogecoin did also not backport segwit, which means that it still suffers from third-party transaction malleability, the quadratic hashing problem, and cannot support a Lightning Network. Since the upcoming Taproot soft fork builds on segwit, the resulting new features including Schnorr signatures, public key and signature aggregation, scriptless scripts, Merklized Alternative Script Tree (MAST), and Discreet Log Contracts (DLC) are also unlikely to become available.
So, Bitcoin and Dogecoin are practically the same, except that Dogecoin has no infrastructure, no ecosystem, a plethora of security and performance issues, maybe one developer, next to no code review, and none of the new shiny features. However, it is a great meme and a funny parody on all altcoins, so it will always have a special place in our hearts.