Automated Market Making: Theory and Practice