Function createExchangeInstruction