This is The Two-Year Emperor by David K. Storrs.
Jake is a 40 year old programmer who has been yanked to the land of Flobovia and made ruler of said country, due to a quirk in local law. He is thus in the unique position to be the de facto dictator of about thirty million citizens and having to deal with the invading army of Deorsi.
Game Breaker: Jake had multiple so bad they necessitated divine intervention.
- Infinite Wishes + Freeing The Genie, in a sense. Vetoed but only for the last maybe six thousand years.
- Infinite Money. No veto.
- Infinite Spells bought from NPCs, or rather buying spells in the market in a capacity completely untenable for the population, let alone the market, to provide. Vetoed.
It was an ally (of sorts) who did the antimatter transformation:
His thoughts were interrupted—finally!—by the arrival of a tiny, ghostly bird. It flew up, hovered in front of him and spoke in Thomas's voice.
Isaac surged to his feet, momentarily forgetting the cold in his excitement. This was it! His moment of triumph! The moment when he became a hero, when everyone finally recognized that his intelligence was just as important—more important!—than the bulging muscles and handsome faces of the other boys from his village. The moment when he proved that the son of a farmer could be just as important, just as worthwhile, as the Count's son in his big house up on the hill, with all his silks and horses and good looks that set the girls swooning.
He could have cast the spell while squatting down, sheltered from the wind, but no. This moment should happen on his feet, standing tall! He was changing history here, and he would do it proudly!
Gleefully, he set the bag on the ground, opening it to reveal the soccer-ball-sized rock inside. The arctic wind whipped his robes and beard around him as he straightened up, glancing once more at the paper even though the words were firmly engraved in his photographic memory.
"Polymorph Any Object: rock to six grams of antimatter osmium!"
The monster-killing device is the FLEA:
"Ladies and gentlemen!" I called, forcing myself not to say "...and children of all ages!" This was, after all, a bit of a circus that I was about to enact. "Welcome to the first test of the Flobovian Level Enhancement Apparatus! FLEA is intended to help every one of you be all that you can be! See those worms? In just a moment, I'm going to ask you lot"—I waved at the more experienced magi, implicitly excluding the group of first-levelers standing to one side—"to Polymorph those worms into fire giants. Everyone ready?" A sussurance of puzzled but willing 'yes'es rolled through the crowd. I called across to Franklin and Kaelan and got another set of 'yes'es.
"Ok, on three. One, two, three!" I called, dropping my hand in a starting signal.
"Polymorph Any Object: Worm to Fire Giant!" they all cried, pointing at the worms. The iron platform across from us was suddenly crowded with thirty-four very confused Fire Giants.
The giants looked around, trying to figure out what was happening. Seeing us, one of them roared and started to shift his weight, only to be interrupted by a trembling teenage voice calling, "Shrinken!"
The tipped-over Wall of Iron that the Fire Giants were standing on was suddenly yanked out from under their feet, becoming a tiny piece of iron foil attached to a pole, well off to the side. The pole held the foil securely so that it didn't fall once it was unsupported. Sadly, the Giants had no such support themselves now that they were hanging in midair, again with great confusion. They didn't have long to be confused; before any of them could react, they plummeted groundwards...
...right onto the Permanencied Wall of Force that had been carefully bent back and forth between the two Walls of Iron, forming a series of infinitely sharp, utterly invisible pleats onto which the Fire Giants fell.
The (pardon me) giant creatures were chopped into sashimi, instantly reverting to normal sized earthworms.
"Ohmygod!" Kaelan gasped. "I...I know ninth level spells!"
It's actually improved upon in the next chapter to grant sixty levels at a time.
Since you accepted the answer, I'm not going to go through and extract more quotes, but it's pretty definite that it's the answer. The author has it available for download off of his Patreon page.