Rinse the mung beans and remove any small stones or damaged beans. Optional: soak for 4 hours or overnight, then drain and rinse.
Peel and devein the shrimp, saving the heads and shells.
Heat a little oil in a pot over medium-high heat. Lightly brown the heads and shells, pressing the heads with a spoon. Add 6 cups of water, the bay leaf, and a little salt and pepper. Bring to a boil, then simmer for 5 minutes and strain.
Soak the sotanghon in warm water until softened, then drain.
Heat a little oil in a heavy-bottomed pot over medium-high heat. Season the shrimp lightly with salt and pepper. Sear about a minute per side, until pink and opaque. Transfer to a plate.
Lower the heat to medium. Cook the onion and garlic until softened, adding oil if needed. Add the tomatoes and cook until soft and starting to caramelize. Stir in the shrimp paste and cook briefly.
Add the mung beans and stock. Bring to a boil, then cover and simmer over medium-low heat for 30–60 minutes, until soft. Unsoaked beans may take longer. Stir occasionally and add water as needed. Mash some cooked beans for a creamier stew.
Add the sotanghon and simmer about 2 minutes, until cooked. Add water if too thick.
Add the shrimp and chili pepper leaves. Cook until the leaves wilt and the shrimp are heated through. Season with fish sauce, oyster sauce, or soy sauce and pepper to taste. Turn off the heat.