Impermanent Loss and Gain of Automated Market Maker Smart Contracts