A Unifying Theory of Electronic Money and Payment Systems