Combine water, yeast and sugar in a standing mixing bowl fitted with the hook attachment. Mix until combined and let it sit for about 25 minutes or until it rises.
Once the mixture has risen, add the melted butter. Continue adding one cup of flour at a time until a dough forms and it's no longer sticky. If it's still sticky you can add a little more flour. If you press your finger into the dough and it bounces back, it's ready.
Knead the dough for 4 minutes until smooth. Form the dough into a ball by hand and place the dough in a bowl with a little bit of butter so it doesn't stick and allow it to rest for another 20 minutes. Cover the dough with a damp towel.
Once it's ready, preheat your oven to 450° F. Cut the dough into 12 pieces. Line two or three baking trays, depending on the size of the tray with parchment paper.
Roll each one into a thin rope (approximately 20 - 22 inches long each), form a U and twist the two ends to form a pretzel shape. Gently pull the tips down and over the pretzel base to seal. Repeat for each rope.
Bring water to a boil and once it is boiling continuously, add the baking soda to it. Place one pretzel in the mixture at a time, and leave them in only for 30 seconds. Do not leave them in longer because they could end up tasting like baking soda.
Place the pretzels on the baking trays, and brush them with the beaten egg if you want them to look golden. Sprinkle with salt if desired and place in the oven for 15 minutes or until golden brown.