1. In a large pot, boil potatoes in water until very soft, 20 to 30 minutes. Drain and mash well.
2. Heat a liberal amount of oil in a sauté pan over medium heat. Add onion and sauté until soft and golden. Add oil and onions to potatoes and continue to mash well. The oil should help give the mixture a creamy texture. Add more oil if necessary. Mix in egg, flour, salt, and pepper.
3. Place mixture into a pastry bag. Pipe long cylinders down the length of a baking sheet. Place baking sheet in freezer, about 25 minutes. Remove and cut cylinders into two-inch bite size pieces (for an easier version you can make small balls using a cookie scoop).
4. Beat two eggs in a shallow bowl. Place flour in another shallow bowl and season with salt and pepper. Place cornflake crumbs in a third. Dredge potato bites in flour, then egg, then crumbs.
5. Heat oil in a deep fryer or large sauté pan to 375 degrees Fahrenheit. Add potato bites and fry until golden brown. Remove to a paper towel-lined plate.