As a melon eater, my biggest concern is, how do you know? Is there an "invoice"? . . Various possibilities flashed through my mind, such as what you hit, what your friend hit, and what your boyfriend's friend exposed, but I can't imagine why your boyfriend admitted it anyway. You must have conclusive evidence, right? Then how did you get your conclusive evidence?
The answer to this question, we can't pursue, because from the standpoint of men, this answer is terrible. At least it seems horrible to me. Even a little creepy.
But I can only restrain my curiosity to answer your question, if I don't consider the position of men and women and only consider this matter. Personally, I prefer principles. If I were you, I wouldn't make any more mistakes. What you have to consider is very simple, that is, whether your feelings for him can go beyond your principled position, and if so, you are willing to choose to forgive him. Then you should at least let your boyfriend know the seriousness of this matter and let him stop doing this. This is the bottom line after you abandon the principle, that is, there will be no next time. Solve the crisis of trust on this basis. Since he went out to look for it, it means that you can't satisfy it. So how to win his favor and let your boyfriend win your trust will be a very huge problem.
Similarly, if your's feelings can't go beyond the your principle, then break up decisively. Even if you tolerate it, you won't love him anymore, because there will be countless suspicions and doubts between you. Once there is a crisis of trust in feelings, it is impermanent, right?
Looking at the problem in another direction, it is definitely not accidental that your boyfriend's behavior is known to you. You have doubts and suspicions yourself, so your emotional problems have cracked. It's causality. You don't trust each other. This is a taboo for feelings. Now that things have come to this, don't let yourself become a tragic heroine. You are fully capable of not being sad, and you also have the ability to solve and deal with this matter. The key is whether you will stand up and do it.