Maybe this will help:
The live rock and live sand would account for the nitrates as the nitrifying bacteria in both those would consume the ammonia produced by the dead shrimp eventually becoming nitrates.
As Sniperhank described, the goal is to have any ammonia level of 2 ppm
or higher be at 0 ppm
in 24 hours or less. But understand that what that means is that your bacteria bed is sufficient to handle the biological load present at the time. To give an example using fish: a tank that is "cycled" by using 3 fish of 1" size, by removing those three 1" fish and adding back six 1" fish, the tank is not cycled for six 1" fish so a rise in ammonia would be expected until the bacteria bed "catches up" with the ammonia level. Thankfully, once established, nitrifying bacteria reproduce rather quickly so that rise in ammonia may not exist for more than say, 24 hours. But it needs to be watched.
So you either need to equate how much ammonia is being produced by those rotting shrimp before adding more life to the tank or just proceed slowly/ cautiously.
Hope this helps.