This untested tweak should speed exchanges up. Should still consider storing rate pairs instead of abusing the stack, though.