Like most coins DGC diff recalculate time is too long to avoid those kind of attacks. TRC diff recalculate is much faster than DGC, and yet TRC is now stuck on a stupidly high difficulty at just 12.15% profitability so nobody will want to mine it.
The entire concept of reducing difficulty based on a block count is out of touch with what really happens after a burst of high hash rate. The idea needs to be thrown out and replaced with a system based on elapsed time, or some other metric.
All these systems look at the velocity of blocks being created, not the acceleration and deceleration of the block rate which is critical.
I totally agree. I have recently sent Baritus private message about this, but unfortunately no response yet - But his time is precious these days
I think diff should be adjusted based on network hashrate. If current network hasrate is k% higher/lower then it was in previous diff ajdustment, it should be adjusted. Of course it could be more inteligent (progressive adjustment, moving average, future hashrate prediction, etc..)
Value of k can be adjusted dynamicly too, based on current conditions.
For Example:
if network hashrate is less then 1GH/s it can be 10%
if network hashrate is less then 10Gh/s it can be 5%
if network hashrate is less then 100Gh/s it can be 1%
etc...
How are you going to work out what the network hash rate is at the time? Currently that's done by counting blocks.
My solution to the hash rate burst problem is simple, reject blocks that try to be added to the chain faster than a predetermined rate. So you are introducing a minimum gap between blocks.
Say a DGC miner finds a new block and want's to submit it to the block chain, the digitalcoind would check the current time against the timestamp on the newest block of the chain and if less than 15sec had elapsed, it would not submit the block. Also the copies of digitalcoind peering, would not accept any blocks to be added to the chain unless their timestamp was at least 15 higher than the highest timestamp in their copy of the block chain, but not higher than the current time. (to avoid cheats) For ARG you would probably make it a 25 sec minimum gap between blocks.
You would need to calculated difficulty slightly differently, it would be based on the ratio of blocks that were submitted exactly at the 15sec mark rather than the 20sec target. Some testing and tuning would be requited. 15secmin between blocks might be too long for a good difficulty calculation, perhaps 10sec.