Prepare the sauerkraut filling by melting the butter in a skillet over medium low heat. Stir in the onion, and cook until light brown, about 20 minutes. Add the drained sauerkraut and cook for an additional 5 minutes. Season to taste with salt and pepper, then remove to a plate to cool.
For the mashed potato filling, melt the butter in a skillet over medium heat. Stir in the onion, and cook over medium low heat until light brown, about 20 minutes. Stir into the mashed potatoes, and season with salt and white pepper.
To make the dough, beat together the eggs, oil and sour cream until smooth. Sift together the flour, salt, and baking powder; stir into the sour cream mixture until dough comes together. Knead the dough on a lightly floured surface until firm and smooth. Divide the dough in half, wrap half in plastic wrap then roll out the other half to 1/8 inch thickness. Cut into 3 inch rounds using a biscuit cutter.
Place a small spoonful of the filling into the center of each round. Moisten the edges with water or egg wash, fold over, and press together with a fork or pinch with fingers to seal.
Bring a large pot of lightly salted water to a very slow boil add 6-8 perogies at a time (do not crowd them) and cook for 3 to 5 minutes or until pierogi float to the top. Remove and drain.
Serve with melted butter and carmelized onions spooned over the top.