How do I keep my tassels from fraying?

I just started to attach tassels to my scarf and I realized they’re starting to fray a bit. Which is something I dont want. What can I do to stop this? Is there anything I can put on it?

May or may not look right, but a tiny overhand knot at the very end of each strand? That would certainly stop the fraying… don’t know how it’d look aesthetically, though.

Some yarn frays more than others. I think it has to do with how tightly plied it is, but all yarns fray some. Just the nature of yarn.