The story
A development of the long s ⟨ſ⟩, an abbreviation of Latin solidus, used to mark the amount of shillings in a sum. Formerly also the slash in all its uses, but this extended sense was taken on by the term solidus.
Etymology from Wiktionary, CC BY-SA 4.0.