The rapid development of information technology has revolutionized conventional contract practices toward decentralized and transparent digital contracts. This phenomenon has given rise to new forms of contracting, such as smart contracts. Smart contracts are digital contracts designed to facilitate automatic (self-executing) contract execution. This research focuses on the legal validity of smart contracts as a digital contract mechanism in online (e-commerce) transactions, as well as the legal liability of the parties arising from their automated execution. The research method used is a normative legal research method with a statute approach, case approach, and analytical approach by analyzing in depth Article 1320 of the Civil Code, Law Number 1 of 2024 concerning Electronic Information and Transactions, the second amendment to Law Number 11 of 2008, Government Regulation Number 71 of 2019 concerning Electronic System Administration and Transactions, Government Regulation Number 80 of 2019 concerning Trade Through Electronic Systems, regarding the requirements for the validity of an agreement, by highlighting the implementation of smart contracts, especially the issue of the competence of the smart contract system. The results of the study show that smart contracts can be implemented technically, but legally based on the requirements for the validity of an agreement in Article 1320 of the Civil Code, smart contracts do not meet the requirements for the validity of an agreement and cannot be implemented perfectly in smart contract agreements and the legal responsibilities of the parties can still be applied in accordance with applicable regulations. Therefore, this study confirms that current smart contract regulations still have a legal vacuum and only rely on conventional legal frameworks such as Article 1320 The Civil Code and Law Number 1 of 2024 concerning Information and Electronic Transactions serve as the primary legal basis for smart contracts.