Abstract: The present invention provides a modular infrastructure for electronic commerce that allows electronic financial instruments to work with a variety of different protocols. One embodiment of the present invention receives a request for an operation, and checks compatibility between the operation and available protocols for the operation to determine a set of compatible protocols. Next, the system checks compatibility between the set of compatible protocols and available instruments for the operation to determine a set of compatible instruments. If the set of compatible instruments includes at least one instrument, the system selects a compatible instrument and a corresponding compatible protocol, and uses this instrument and protocol to perform the operation.