After the Gods and Goddesses had built Asgard and were starting to go about their daily life, a Smith arrived. This smith was a master builder and he came from the lands of the giants. Since the Gods had not built any walls around Asgard, he offered to build the walls for them. He said they would be so strong, that no mountain trolls or giants would be able to break through the wall.
The master build said; In payment for this, I want the Goddess Freya as my wife, and… he added, I also want the sun and the moon.
The Aesir looked at each other and talked among themselves…
After some time they look at him and said; We agree on your terms, but you must build the wall around Asgard in one winter, and you are not allowed to get help from any other man. If any parts of the wall are unfinished on the first day of summer, you will lose your payment.
Then Loki said; You can use your horse Svadilfari if you want.
On the first day of winter, the master-builder began to build the walls. He worked both day and night, during the day he worked on the walls, and during the night, he used his horse to haul in stones.
The Aesir were amazed at the size of the stones the horse could drag; The horse was twice as strong as the master builder. But it was too late for the Gods to change the terms of their agreement. The Gods had also sworn an oath that he would not be harmed by any of the Gods while he built the walls. During this winter, Thor who really hates giants and trolls was not home, he was traveling in the mountains in the east, slaying the trolls.
As the winter days slowly passed, the walls around Asgard had become so tall and strong, that no troll would ever be able to climb or break through the wall. And with only three winter days left before summer, the master-builder only needs to finish the entrance to Asgard.
The Gods and Goddesses were worried and sat on their thrones of fate, and tried to come up with a solution. We can not let the builder get married to the Goddess Freya and take her away from Asgard. And if we remove the sun and the moon from the sky, the world will become cold and dark.
Who of us is really responsible for this decision?
Then the Aesir said; Loki if you do not come up with a plan to make the giant builder lose his payment, it will cost you, your life, and you will die a painful death.
The Aesir attacked Loki and began to hit him; Loki became frightened and said no please stop, I swear, I swear that I will find a way to make him lose his payment, no matter what.
In the evening when the master builder drove out his stallion Svadilfari to gather stones, a mare leaped out from the nearby forest. When the stallion saw the mare, he became frantic and broke free from his chains and galloped towards the mare, but the mare ran back into the forest.
The builder ran after his horse into the forest. Because the two horses ran around in the forest all that evening and night, the work on the wall was delayed.
The next morning when the master builder finally caught his horse and came out from the forest, he could see that the walls would not be finished in time, he went into a giant’s rage. Yelling and screaming, he smashed the stones and trees around him.
The Aesir now for certain realized that the master-builder was a giant, so they no longer respected their oaths with him. The Aesir called upon the God Thor, who came immediately after hearing about the giant. When Thor arrived he threw his hammer Mjolnir at the giant and broke the giant’s skull into small pieces.
Because of Loki’s relations with Svadilfari, many months later, Loki gave birth to a horse, it was grey and had eight legs, this horse was Sleipnir, and it would become the best and fastest horse among all of the horses.