According to Skáldskaparmál, Loki had Sif's hair, Freyr's ship Skíðblaðnir and Odin's spear Gungnir fashioned by the Sons of Ivaldi. Loki boasted greatly of all the things that the Sons of Ivaldi could create. He also boasted that the other dwarves could not create anything beautiful or useful. Brokkr, who was in Asgard at the time, declared that his brother Eitri could make things far more beautiful and useful than the Sons of Ivaldi. Brokkr bet his head with that of Loki that his brother Eitri could make things with better craftsmanship than Skíðblaðnir or Gungnir.
While Eitri used magic in a forge that was extremely hot, Brokkr worked the bellows so that the fire would not cool down nor get too hot for the magic. While making the boar Gullinbursti, a gadfly, often thought to be Loki himself, came and bit Brokkr on the hand. Brokkr was not disturbed though and kept blowing into the fire. While making the golden arm ring Draupnir the gadfly came again and bit Brokkr, this time in the neck but Brokkr kept on blowing. Finally, while making the hammer Mjölnir the gadfly bit Brokkr on the eye this time. This temporarily caused Brokkr to stop blowing. That brief stoppage of blowing into the fire caused Mjölnir's handle to become shorter than it should have been. Because of this, Thor had to wear the iron gauntlets Járngreipr to handle it.
Eitri succeeded in making the golden ring Draupnir, the golden-bristled boar Gullinbursti and the hammer Mjölnir. These objects were judged by the gods to be superior and Brokkr won the bet. However, Loki did not allow him to take his head as doing so would have damaged his neck which was not included in the bet. In lieu of this, Brokkr sewed Loki's lips so that Loki would not brag until the thread came out.