Understanding Curve Finance and Its Mechanisms