add a func logSwapRate();
fix some bug;
func logSwap() test ok