The US and Iran are close to a one-page memorandum to end hostilities, easing regional tensions and impacting markets.