Mix flour, salt, water, and egg (if using) in a bowl to form dough. Knead the dough until elastic. Cover and rest for 15-20 minutes.
2 cups of all-purpose flour, 1 cup of water, ½ tsp of salt, 1 egg
Boil potatoes for the filling. It should take around 20 min. Drain and mash them.
3 medium potatoes
Peel, dice, and cook onions in oil.
2 onions, vegetable oil
Mix ½ of the fried onion with mashed potatoes and leave the rest for topping. Season with salt and pepper.
Salt and pepper to taste
Roll the dough very thin (about ⅛ inches) on a floured board. Make dough circles (I use a glass).
Place one scoop of filling in the middle of each dough circle. Form a half-moon shape by folding the dough over the filling. To close, press the edges together tightly.
Boil a pot of water. Add the varenyky to boiling water and cook them for about 5 minutes. You know they're ready when they float to the top.
Drain the varenyky and serve on a plate. Top with fried onions. I also recommend trying them with sour cream.