E-commerce is an integral element of the modern economy. The rapid development and change of e-commerce forces not only business and society, but also the state to adapt to such changes. In the last few years, the choice of optimal rules for regulating e-commerce has already become not only a scientific, but also a clearly expressed practical problem. At the same time, this problem is far from a final solution, since, as e-commerce evolves, it raises more and more complex questions. In the context of the study, an attempt is made to analyze the dynamics of the development of the legal foundations of electronic commerce and to develop directions for their improvement, taking into account the peculiarities of the development of electronic commerce. © 2022, The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd.