Market Microstructure Design and Flash Crashes: A Simulation Approach