The formula is the main thing. You can only apply for an invention patent, and others can't add this formula to candy. But if the shape is the main thing, you don't need to apply for an invention patent, just apply for a design, and no matter what formula someone else's candy is, it can't be made into the shape of Mickey Mouse.