SwapBack function is implemented based on Swap