Skip to main content

Overview

Smart Transactions are a type of blockchain transaction that gets executed depending on the timing chosen by a specialized entity, often called a solver. This specific timeframe, known as MEV time, is when these solvers pick which transactions to execute.

With Smart Transactions, users can set exact conditions that determine when or how their transactions should be carried out, offering more control over timing and conditions.

Smart Transactions are built on a set of smart contracts designed to handle transactions with specific timing or conditional features. Participants can submit these transactions to a special queue, called a mempool, for later execution. Users can customize these transactions to include protections against frontrunning and backrunning or to execute only when certain conditions are met.

For example, a Smart Transaction might send tokens to a specific address after a certain delay or on a regular schedule, similar to a subscription service.

git clone https://github.com/smart-transaction/stxn-contracts-core

Generally, users use their LaminatedProxy to queue up calls they want executed in the future by pushing an abi.encoded list of CallObjects to the mempool. In order for Alice to enforce invariants on her own calls (e.g. for her to make sure that Bob gives her 20 Token B back in exchange for her 10 token A), she uses utilities from SmarterContract to introspect on the context of her call. Solvers will then ensure that transactions are executed within the user's defined constraints and at the appropriate future point in time.

Smart Transactions Diagram