āļšāļ—āđ€āļĢāļĩāļĒāļ™āļ—āļĩāđˆ 7

Smart contracts and customizations on Mintlayer

This module introduces the smart contract functionality of Mintlayer, including its differences from the Ethereum Solidity model, and the technical process of deploying and interacting with smart contracts through transactions.

Mintlayer's built-in smart contracts functionality

Mintlayer proposes an innovative smart contract approach by directly embedding basic functionalities into the protocol. Unlike more flexible and Turing-complete smart contract systems like Ethereum, Mintlayer's smart contracts areNot Turing completeThis design choice is intended to prioritize speed, simplicity, and security over flexibility.

The purpose of these built-in contracts is to solve specific financial application scenarios with the lowest cost. Mintlayer's smart contracts are tightly integrated with its UTXO model borrowed from Bitcoin. By using the UTXO system, Mintlayer avoids the complex contract code required to perform most operations. Instead, Mintlayer directly applies simple rules such as multi-signature requirements or access control lists (ACL) in transactions.

These contracts are not a general-purpose programming environment, but specifically designed for managing tokens, dividends, taxes, and transaction authorization. This structure provides greater predictability for execution and reduces common vulnerabilities or attack risks in complex systems.

Execute smart contracts through transactions

The unique feature of Mintlayer's smart contract execution model is that it is directly linked to its UTXO system. Unlike the deployment of independent contracts on Ethereum, contracts on Mintlayer are executed as part of the transaction. This is achieved by embedding the contract logic into the transaction itself and managing the operation of the contract with predefined rules. For example, if a token issuer wants to levy a tax on every transfer of their token, they only need to define this rule when issuing the token, and the rule will be automatically enforced in all transactions involving that token.

There are several advantages to this approach. First, it ensures that the contract logic is executed consistently across the entire network. There is no need to interact with a separate contract account as all necessary information is included in the transaction itself. This also reduces the risk of errors or defects as contract functionality is pre-defined and does not require custom coding. Second, this approach makes contract execution more efficient. Since the contract is embedded in the transaction, no additional computing resources are needed to run the contract code, which maintains low transaction costs and high execution speeds.

Customizable features of the token issuer

Mintlayer provides token issuers with various custom options, allowing them to tailor tokens to specific use cases. These features include:

  • taxToken issuers can implement transaction taxes, automatically deducting a small portion in each transfer and sending it to a designated address. This feature is useful for projects looking to fund development or other community activities through token trading.
  • dividendsThe token issuer can distribute dividends to token holders based on predefined rules. For example, a company issuing security tokens can use this feature to directly pay profits to shareholders on the blockchain. Dividend payments are automated and can be distributed at specified intervals without human intervention.
  • Compliance mechanism (Access Control List - ACL)The Mintlayer system allows token issuers to implement ACL to restrict the transfer of tokens to specific addresses. This is particularly useful in security tokens where only verified investors are allowed to hold the tokens. ACL can be updated as compliance requirements change to ensure tokens are circulated legally.
  • Multi-Signature (Multi-Sig) TransactionMulti-signature function allows the token issuer to require multiple approvals before executing a transaction. This is particularly important for security tokens that need to comply with legal regulations. For example, the token issuer can require approval from the issuing company and regulatory agency before executing each transfer.
    These features help build compliant financial applications on Mintlayer, especially for security tokens and stablecoins. Complex compliance rules can be implemented without writing custom contract code, making Mintlayer a powerful tool for regulated industries.

The future development of customization and compliance

Mintlayer's roadmap includes further development in smart contracts customization and compliance mechanisms. Future upgrade plans expand the functionality of ACL to provide more granular control over token transfers. This is particularly useful for industries that require strict compliance rules, such as finance or healthcare.

Mintlayer is exploring advanced features of its multi-signature functionality to enable more complex transaction approval processes. For example, a company issuing security tokens may require multiple departments (such as legal and finance) to approve the transaction before execution. This feature is particularly useful for large organizations that require more complex governance structures.

A key focus of future development is the integration of zero-knowledge proofs, which will allow for greater privacy in token transfers. This feature will enable users to prove compliance with certain rules (such as verified investor identity) without revealing their identity or other sensitive information.

Highlights

  • Mintlayer's smart contracts are built into the protocol and integrated with its UTXO system.
  • The system prioritizes security and efficiency over flexibility, in contrast to Ethereum's more complex model.
  • Smart contracts are executed directly through transactions, simplifying the process and reducing costs.
  • The customizable functions of the token issuer include taxation, dividends, ACL, and multisignature transactions.
  • Future development aims to expand custom functionalities, including more advanced ACL and zero-knowledge proofs for privacy.
āļ‚āđ‰āļ­āļˆāļģāļāļąāļ”āļ„āļ§āļēāļĄāļĢāļąāļšāļœāļīāļ”
* āļāļēāļĢāļĨāļ‡āļ—āļļāļ™āļ„āļĢāļīāļ›āđ‚āļ•āļĄāļĩāļ„āļ§āļēāļĄāđ€āļŠāļĩāđˆāļĒāļ‡āļŠāļđāļ‡ āđ‚āļ›āļĢāļ”āļ”āļģāđ€āļ™āļīāļ™āļāļēāļĢāļ”āđ‰āļ§āļĒāļ„āļ§āļēāļĄāļĢāļ°āļĄāļąāļ”āļĢāļ°āļ§āļąāļ‡ āļŦāļĨāļąāļāļŠāļđāļ•āļĢāļ™āļĩāđ‰āđ„āļĄāđˆāđ„āļ”āđ‰āļĄāļĩāđ„āļ§āđ‰āđ€āļžāļ·āđˆāļ­āđ€āļ›āđ‡āļ™āļ„āļģāđāļ™āļ°āļ™āļģāđƒāļ™āļāļēāļĢāļĨāļ‡āļ—āļļāļ™
* āļŦāļĨāļąāļāļŠāļđāļ•āļĢāļ™āļĩāđ‰āļŠāļĢāđ‰āļēāļ‡āļ‚āļķāđ‰āļ™āđ‚āļ”āļĒāļœāļđāđ‰āđ€āļ‚āļĩāļĒāļ™āļ—āļĩāđˆāđ„āļ”āđ‰āđ€āļ‚āđ‰āļēāļĢāđˆāļ§āļĄ Gate Learn āļ„āļ§āļēāļĄāļ„āļīāļ”āđ€āļŦāđ‡āļ™āļ‚āļ­āļ‡āļœāļđāđ‰āđ€āļ‚āļĩāļĒāļ™āđ„āļĄāđˆāđ„āļ”āđ‰āļĄāļēāļˆāļēāļ Gate Learn
āđāļ„āļ•āļ•āļēāļĨāđ‡āļ­āļ

āļšāļ—āđ€āļĢāļĩāļĒāļ™āļ—āļĩāđˆ 1:Mintlayer Introduction

65 āļĨāļ‡āļ—āļ°āđ€āļšāļĩāļĒāļ™āđāļĨāđ‰āļ§

āļšāļ—āđ€āļĢāļĩāļĒāļ™āļ—āļĩāđˆ 2:Mintlayer's blockchain architecture

22 āļĨāļ‡āļ—āļ°āđ€āļšāļĩāļĒāļ™āđāļĨāđ‰āļ§

āļšāļ—āđ€āļĢāļĩāļĒāļ™āļ—āļĩāđˆ 3:Tokenization on Mintlayer

18 āļĨāļ‡āļ—āļ°āđ€āļšāļĩāļĒāļ™āđāļĨāđ‰āļ§

āļšāļ—āđ€āļĢāļĩāļĒāļ™āļ—āļĩāđˆ 4:Mintlayer's decentralized finance (DeFi) approach

13 āļĨāļ‡āļ—āļ°āđ€āļšāļĩāļĒāļ™āđāļĨāđ‰āļ§

āļšāļ—āđ€āļĢāļĩāļĒāļ™āļ—āļĩāđˆ 5:ML Token and stake

19 āļĨāļ‡āļ—āļ°āđ€āļšāļĩāļĒāļ™āđāļĨāđ‰āļ§

āļšāļ—āđ€āļĢāļĩāļĒāļ™āļ—āļĩāđˆ 6:Decentralized exchange (DEX) on Mintlayer

13 āļĨāļ‡āļ—āļ°āđ€āļšāļĩāļĒāļ™āđāļĨāđ‰āļ§

āļšāļ—āđ€āļĢāļĩāļĒāļ™āļ—āļĩāđˆ 7:Smart contracts and customizations on Mintlayer

10 āļĨāļ‡āļ—āļ°āđ€āļšāļĩāļĒāļ™āđāļĨāđ‰āļ§

āļšāļ—āđ€āļĢāļĩāļĒāļ™āļ—āļĩāđˆ 8:Security and Privacy on Mintlayer

9 āļĨāļ‡āļ—āļ°āđ€āļšāļĩāļĒāļ™āđāļĨāđ‰āļ§

āļšāļ—āđ€āļĢāļĩāļĒāļ™āļ—āļĩāđˆ 9:Ecosystem Development and Tool Support

14 āļĨāļ‡āļ—āļ°āđ€āļšāļĩāļĒāļ™āđāļĨāđ‰āļ§

āļšāļ—āđ€āļĢāļĩāļĒāļ™āļ—āļĩāđˆ 10:Future roadmap and ecosystem rise

24 āļĨāļ‡āļ—āļ°āđ€āļšāļĩāļĒāļ™āđāļĨāđ‰āļ§
āđāļ„āļ•āļ•āļēāļĨāđ‡āļ­āļ
āļšāļ—āđ€āļĢāļĩāļĒāļ™āļ—āļĩāđˆ 7

Smart contracts and customizations on Mintlayer

This module introduces the smart contract functionality of Mintlayer, including its differences from the Ethereum Solidity model, and the technical process of deploying and interacting with smart contracts through transactions.

Mintlayer's built-in smart contracts functionality

Mintlayer proposes an innovative smart contract approach by directly embedding basic functionalities into the protocol. Unlike more flexible and Turing-complete smart contract systems like Ethereum, Mintlayer's smart contracts areNot Turing completeThis design choice is intended to prioritize speed, simplicity, and security over flexibility.

The purpose of these built-in contracts is to solve specific financial application scenarios with the lowest cost. Mintlayer's smart contracts are tightly integrated with its UTXO model borrowed from Bitcoin. By using the UTXO system, Mintlayer avoids the complex contract code required to perform most operations. Instead, Mintlayer directly applies simple rules such as multi-signature requirements or access control lists (ACL) in transactions.

These contracts are not a general-purpose programming environment, but specifically designed for managing tokens, dividends, taxes, and transaction authorization. This structure provides greater predictability for execution and reduces common vulnerabilities or attack risks in complex systems.

Execute smart contracts through transactions

The unique feature of Mintlayer's smart contract execution model is that it is directly linked to its UTXO system. Unlike the deployment of independent contracts on Ethereum, contracts on Mintlayer are executed as part of the transaction. This is achieved by embedding the contract logic into the transaction itself and managing the operation of the contract with predefined rules. For example, if a token issuer wants to levy a tax on every transfer of their token, they only need to define this rule when issuing the token, and the rule will be automatically enforced in all transactions involving that token.

There are several advantages to this approach. First, it ensures that the contract logic is executed consistently across the entire network. There is no need to interact with a separate contract account as all necessary information is included in the transaction itself. This also reduces the risk of errors or defects as contract functionality is pre-defined and does not require custom coding. Second, this approach makes contract execution more efficient. Since the contract is embedded in the transaction, no additional computing resources are needed to run the contract code, which maintains low transaction costs and high execution speeds.

Customizable features of the token issuer

Mintlayer provides token issuers with various custom options, allowing them to tailor tokens to specific use cases. These features include:

  • taxToken issuers can implement transaction taxes, automatically deducting a small portion in each transfer and sending it to a designated address. This feature is useful for projects looking to fund development or other community activities through token trading.
  • dividendsThe token issuer can distribute dividends to token holders based on predefined rules. For example, a company issuing security tokens can use this feature to directly pay profits to shareholders on the blockchain. Dividend payments are automated and can be distributed at specified intervals without human intervention.
  • Compliance mechanism (Access Control List - ACL)The Mintlayer system allows token issuers to implement ACL to restrict the transfer of tokens to specific addresses. This is particularly useful in security tokens where only verified investors are allowed to hold the tokens. ACL can be updated as compliance requirements change to ensure tokens are circulated legally.
  • Multi-Signature (Multi-Sig) TransactionMulti-signature function allows the token issuer to require multiple approvals before executing a transaction. This is particularly important for security tokens that need to comply with legal regulations. For example, the token issuer can require approval from the issuing company and regulatory agency before executing each transfer.
    These features help build compliant financial applications on Mintlayer, especially for security tokens and stablecoins. Complex compliance rules can be implemented without writing custom contract code, making Mintlayer a powerful tool for regulated industries.

The future development of customization and compliance

Mintlayer's roadmap includes further development in smart contracts customization and compliance mechanisms. Future upgrade plans expand the functionality of ACL to provide more granular control over token transfers. This is particularly useful for industries that require strict compliance rules, such as finance or healthcare.

Mintlayer is exploring advanced features of its multi-signature functionality to enable more complex transaction approval processes. For example, a company issuing security tokens may require multiple departments (such as legal and finance) to approve the transaction before execution. This feature is particularly useful for large organizations that require more complex governance structures.

A key focus of future development is the integration of zero-knowledge proofs, which will allow for greater privacy in token transfers. This feature will enable users to prove compliance with certain rules (such as verified investor identity) without revealing their identity or other sensitive information.

Highlights

  • Mintlayer's smart contracts are built into the protocol and integrated with its UTXO system.
  • The system prioritizes security and efficiency over flexibility, in contrast to Ethereum's more complex model.
  • Smart contracts are executed directly through transactions, simplifying the process and reducing costs.
  • The customizable functions of the token issuer include taxation, dividends, ACL, and multisignature transactions.
  • Future development aims to expand custom functionalities, including more advanced ACL and zero-knowledge proofs for privacy.
āļ‚āđ‰āļ­āļˆāļģāļāļąāļ”āļ„āļ§āļēāļĄāļĢāļąāļšāļœāļīāļ”
* āļāļēāļĢāļĨāļ‡āļ—āļļāļ™āļ„āļĢāļīāļ›āđ‚āļ•āļĄāļĩāļ„āļ§āļēāļĄāđ€āļŠāļĩāđˆāļĒāļ‡āļŠāļđāļ‡ āđ‚āļ›āļĢāļ”āļ”āļģāđ€āļ™āļīāļ™āļāļēāļĢāļ”āđ‰āļ§āļĒāļ„āļ§āļēāļĄāļĢāļ°āļĄāļąāļ”āļĢāļ°āļ§āļąāļ‡ āļŦāļĨāļąāļāļŠāļđāļ•āļĢāļ™āļĩāđ‰āđ„āļĄāđˆāđ„āļ”āđ‰āļĄāļĩāđ„āļ§āđ‰āđ€āļžāļ·āđˆāļ­āđ€āļ›āđ‡āļ™āļ„āļģāđāļ™āļ°āļ™āļģāđƒāļ™āļāļēāļĢāļĨāļ‡āļ—āļļāļ™
* āļŦāļĨāļąāļāļŠāļđāļ•āļĢāļ™āļĩāđ‰āļŠāļĢāđ‰āļēāļ‡āļ‚āļķāđ‰āļ™āđ‚āļ”āļĒāļœāļđāđ‰āđ€āļ‚āļĩāļĒāļ™āļ—āļĩāđˆāđ„āļ”āđ‰āđ€āļ‚āđ‰āļēāļĢāđˆāļ§āļĄ Gate Learn āļ„āļ§āļēāļĄāļ„āļīāļ”āđ€āļŦāđ‡āļ™āļ‚āļ­āļ‡āļœāļđāđ‰āđ€āļ‚āļĩāļĒāļ™āđ„āļĄāđˆāđ„āļ”āđ‰āļĄāļēāļˆāļēāļ Gate Learn