The principle of freedom of contract, as regulated in Article 1338 paragraph (1) of the Indonesian Civil Code, affirms that legally formed agreements bind the parties as law. This principle grants contractual autonomy to determine the formation, parties, and content of agreements, provided they do not violate statutory law, public order, or morality. However, such freedom is limited by the principles of good faith, fairness, proportionality, and the protection of weaker parties.The development of blockchain technology has introduced smart contracts as automatically executed electronic agreements based on pre-programmed code. Legally, smart contracts may be considered valid contracts insofar as they fulfill the requirements of Article 1320 of the Indonesian Civil Code and comply with the Law on Electronic Information and Transactions. Digital consent, such as authorization through a digital wallet, constitutes a legitimate expression of agreement.Smart contracts represent a modern manifestation of freedom of contract by enabling automated performance without third-party intervention, reflecting the prior intention of the parties embedded in blockchain-based code. Their application on platforms such as Stellar Lumens (XLM) demonstrates practical implementation in cryptocurrency transactions. Nevertheless, legal challenges remain, including regulatory gaps, transaction anonymity, technological inequality, and potential imbalances in bargaining power. Therefore, adaptive legal regulation is essential to ensure legal certainty, fairness, and effective legal protection.