This research is motivated by the rapid development of blockchain technology and the increasing use of smart contracts in modern business transactions in Indonesia, while the national legal framework does not yet provide regulations that comprehensively regulate the validity, automatic execution mechanism, and legal accountability of smart contracts. The absence of clear technical rules raises various problems, especially related to the suitability of smart contracts with the legal terms of the agreement in the Civil Code, ranging from the aspects of the agreement, the competence of the parties, certain objects, and halal causa. To answer these questions. This study uses a normative juridical method with legislative and conceptual approaches. Various regulations, including the Civil Code, ITE Law, PP 71/2019, and POJK 77/2016, as well as provisions governing electronic systems and transactions, were analyzed to assess the extent to which smart contracts can be recognized in the Indonesian legal system. The results show that although smart contracts can be positioned as legitimate agreements based on the principle of freedom of contract and the open nature of Indonesian contract law, there are still significant regulatory loopholes that have the potential to create legal uncertainty. The main challenges include the validity of digital agreements, verification of the skills of parties who are only identified through public addresses, potential errors in oracles as an external data source, and potential misuse of technology due to blockchain anonymity, which makes it difficult to prove causa that is halal. In addition, the lack of technical standards regarding code audits, automatic dispute resolution mechanisms, and accountability flows in the event of a bug in smart contracts adds to the legal vulnerability of the parties to the transaction. Thus, this study emphasizes the need to develop special regulations or integrated technical guidelines that can ensure legal certainty, protect parties, and support the safe and sustainable use of smart contracts in Indonesia's digital economy ecosystem.