Heat the oil in a large saucepan over medium heat. Add the onion and cook until softened and just beginning to brown, about 5 minutes.
Pour in the lentils and broth. Bring the lentils to a boil, then partially cover and reduce heat to low.
Simmer for about 20 minutes, or until most of the liquid has absorbed and the lentils are tender enough to eat, but still firm enough to hold their shape.
Stir in the tomato sauce, molasses, vinegar, sugar, tomato paste, tamari, mustard powder, garlic, and cayenne. Increase the heat to medium and bring the mixture to a slow boil.
Continue to cook until the sauce has thickened, 10-15 minutes more, stirring frequently.
Divide the lentil mixture onto the hamburger buns and serve. Leftovers will keep in the freezer for 2-3 months.