Boil the yams or potatoes, then mash smoothly with a fork (or prepare the instant mashed potatoes using directions on package, but using water instead of milk).
Prepare the sauce in a separate saucepan by frying the onions with salt and pepper in palm oil.
Add the tomatoes, if desired, and remove the saucepan from heat.
Mash the solid egg yolks from 2 of the hard-boiled eggs, and stir into the sauce mixture.
Stir sauce into mashed yams and mix well until the color is even.
Empty the oto into a bowl and decorate with remaining whole hard-boiled eggs.