After careful consideration, the council of wizards has come to a decision: we will build the dragon a moat, but it will be made of jelly. Yes, you read that right. Jelly. The council members were torn between a moat of lava and a moat of sharks, but in the end, someone pointed out that jelly is both more cost-effective and less likely to result in lawsuits.
As a result, the dragon will be able to cross the moat with ease, but it will also have to navigate the sticky, gooey surface. The council hopes this will teach the dragon to be more mindful of its hoarding.
Other options were considered, but ultimately discarded. The moat of piranhas was vetoed due to concerns about water conservation, and the moat of spikes was rejected due to safety regulations.