Miner Extractable Value (MEV) සහ Programmable Money: The Good, The Bad, and The Ugly

By Bitcoin සඟරාව - මාස 3 කට පෙර - කියවීමේ වේලාව: විනාඩි 11 යි

Miner Extractable Value (MEV) සහ Programmable Money: The Good, The Bad, and The Ugly

හි හරය Bitcoin’s security model relies on this basic game theory—miners, armed with their digital pickaxes, are in a relentless chase for profit. And it’s this pursuit that keeps the network secure. Basic vanilla mining involves producing blocks to earn the block rewards and transaction fees, but have you ever considered that miners might have other ways to extract value from the blockchain beyond this standard mining process? Are there other avenues for profit on the blockchain where miners can leverage their unique position as validators?

MEV යනු කුමක්ද?

වැඩ ඔප්පු කිරීමේ පද්ධති තුළ, "මයිනර් නිස්සාරණය කළ හැකි අගය"(meV) යනු පතල් කම්කරුවන්ට ඔවුන් පතල් කරන කුට්ටි තුළ ගනුදෙනු ප්‍රමුඛත්වය දෙන, බැහැර කරන, නැවත සකස් කරන හෝ වෙනස් කරන ආකාරය හැසිරවීමෙන් උපයා ගත හැකි ලාභ විස්තර කරන යෙදුමකි. කෙසේ වෙතත්, Ethereum විසින් Ethereum 2.0 වෙත උත්ශ්‍රේණි කිරීම නිසා, ජාලය කොටස් ඔප්පු කිරීම වෙත ගෙන යන ලද බැවින්, MEV සංකල්පය නව නමක් ගෙන ඇති අතර දැන් සාධන-ඔෆ්-ස්ටේක් පද්ධතිවල "උපරිම නිස්සාරණය කළ හැකි අගය" ලෙස හැඳින්වේ. මෙම සන්දර්භය තුළ, මෙම අගය උකහා ගැනීමට අවස්ථාව ඇත්තේ පතල් කම්කරුවන් වෙනුවට බ්ලොක් යෝජකයන්ට - වලංගු කරන්නන් කවුරුන්ද යන්නයි.

පතල්කරුවන් (හෝ Ethereum හි වලංගු කරන්නන්) මෙම ජාල වල විශේෂ කාර්යභාරයක් ඇත බ්ලොක් වල ගනුදෙනු තහවුරු කරයි. ඔවුන්ගේ පිහිටීම අනෙකුත් පරිශීලකයින්ට වඩා පියවරක් ඉදිරියෙන් තබා ඇති අතර ඒවා තීරණය කිරීමට ඔවුන්ට ඉඩ සලසයි ගනුදෙනු වල අවසාන අනුපිළිවෙල දාමයේ. බ්ලොක් එකක් තුළ, ගනුදෙනු සාමාන්‍යයෙන් ඉහළම ඉහළම ගාස්තු සමඟ ඇණවුම් කරනු ලැබේ, නමුත් පතල්කරුවන්ට ලබා ගැනීමට ඉඩ සලසන සෑම විටම නැවත නැවතත් අවස්ථා විවෘත වේ. අමතර ලාභය ඔවුන්ගේම ප්රයෝජනය සඳහා ගනුදෙනු අනුපිළිවෙල උපායමාර්ගිකව වෙනස් කිරීමෙනි.

ඔබ සිතනු ඇත, පතල් කම්කරුවන්ට ඉහළින් අමතර ලාභයක් ලබා ගැනීමට ඉඩ දීමෙන් ඇති හානිය කුමක්ද? උත්සුකතාවන් වර්ධනය වීමට පටන් ගන්නේ මෙම පතල්කරුවන්ගෙන් සමහරක්, වඩා දියුණු විශ්ලේෂණාත්මක හැකියාවන් සහ වඩා බලවත් පරිගණනයකින් සමන්විත වූ විට, අනෙක් අයට වඩා MEV ලාභ අවස්ථා හඳුනාගෙන ඒවා වඩාත් ඵලදායී ලෙස භාවිතා කළ හැකි වූ විට පමණි.

These opportunities might not always be easy to spot, but the more value that can be extracted through analyzing the chain, the stronger the incentive becomes for research teams equipped with bots to do this work. Over time, this disparity in miner's profit-making ability creates a trend toward centralization within the network. Ultimately undermining the core principle of the blockchain: decentralization.

This is exactly the scenario the Bitcoin developer community is aiming to prevent when considering how best to manage more expressivity on Bitcoin.

අපට වැඩසටහන්ගත කළ හැකි මුදල් අවශ්‍ය වන්නේ ඇයි?

Ically තිහාසිකව, Bitcoin has operated with relatively simple smart contracts. However, this model struggles with even moderately complex transactions. Bitcoin Script can only validate authentication data, it doesn’t have the capability to impose speed limits on transactions or define coin destinations because Bitcoin Script doesn’t have access to transaction data.

As a somewhat separate issue, working with and writing Bitcoin smart contracts can be challenging for users who don't fully grasp its security requirements. A proposed feature, known as ‘vaults,’ aims to solve some of these pain points by introducing time-locked conditions for transactions. Essentially, vaults could serve as an emergency “escape hatch,” allowing users to recover their funds in the event of compromised private keys. But features like this are only possible with more expressivity.

Ethereum is widely recognized for its highly expressive scripting capabilities, but it also notably struggles with the issue of MEV. Most users generally assume that Bitcoin has no MEV, in stark contrast to Ethereum, which is viewed as a wild frontier for it. But is this the full story?

වඩාත් ප්‍රකාශිත ස්මාර්ට් කොන්ත්‍රාත්තු ස්වයංක්‍රීයව තවත් MEV අවස්ථා දිරිමත් කරයිද?

MEV සඳහා දායක වන සාධක කිහිපයක් තිබේ: (1) මෙම්පූල් විනිවිදභාවය, (2) ස්මාර්ට් කොන්ත්‍රාත්තුවේ විනිවිදභාවය සහ (3) ස්මාර්ට් කොන්ත්‍රාත්තු ප්‍රකාශනය. මෙම එක් එක් සාධක MEV සඳහා නව නාලිකා විවෘත කරයි, අපි එක් එක් මෙහි සමාලෝචනය කරන්නෙමු.

නරක: (1) මෙම්පූල් විනිවිදභාවය

වැනි Bitcoin's mempool, the mempools of most blockchains are fully transparent, open, and visible, so that everyone can see what transactions are pending before being validated and confirmed in a block. Bitcoin blocks typically take about 10 minutes to find, which theoretically gives miners that same amount of time to take advantage and front-run.

In practice, on Bitcoin, this isn’t a source of MEV for a few reasons: (1) Bitcoin transactions are simple enough that no miners have a significant analytic advantage over other miners, and (2) Bitcoin transactions generally don’t execute multi-asset transactions such as swaps or open trades that could be front-run.

පොදු විමධ්‍යගත හුවමාරු (DEXs) මත සිදුවන වඩාත් සංකීර්ණ බහු-වත්කම් ගනුදෙනු ඇති Ethereum සමඟ මෙය වෙනස් කරන්න. නිල වශයෙන් Ethereum හි වාරණ කාලය තත්පර 15 කි, නමුත් ඉහළ mempool ගමනාගමන කාලවලදී, ක්ෂණික අවහිර කිරීම් ඇතුළත් කිරීම සඳහා අවශ්ය ගෑස් ගාස්තු පහසුවෙන් ඩොලර් සියයක් ඉක්මවිය හැක. එහි ප්‍රතිඵලයක් වශයෙන්, අඩු ගාස්තු සහිත ගනුදෙනු බ්ලොක් එකකට ඇතුළත් කිරීමට මිනිත්තු කිහිපයක් හෝ පැය ගණනක් බලා සිටීම අවසන් වේ. Layer-2 ටෝකන් වල ඔතා ඇති සැලකිය යුතු අගය හේතුවෙන් Ethereum හි දැනටමත් වඩාත් ප්‍රචලිතව ඇති මෙම නපුරු පෙරටුගාමී අවස්ථා සඳහා කවුළුව මෙය දිගු කළ හැකිය.

නරක: (2) ස්මාර්ට් කොන්ත්‍රාත්තුවේ විනිවිදභාවය

In Bitcoin “smart contracts” are the simple locking and unlocking mechanism inherent in Bitcoin තිර රචනය. The transaction values, sender, and receiver details are all publicly visible on the blockchain. While this complete and naked transparency isn’t ideal from a privacy perspective, it’s part of how Bitcoin allows all participants in the network to verify the full state of the blockchain. Any observer can analyze these contract details, potentially opening the door to certain MEV-related strategies.

නමුත් Bitcoin scripting language is, by design, quite limited, focusing primarily on the basic functions of sending and receiving funds, and validating transactions with signatures or hashlocks. This simplicity inherently limits the scope for MEV strategies on Bitcoin, making such opportunities relatively scarce compared to other chains.

Platforms like Ethereum, Solana, and Cardano also have fully transparent smart contracts, but they diverge from Bitcoin by also having highly complex and expressive scripting languages. Their Turing-complete systems make it possible to theoretically execute virtually any computational task which has come to include: self-executing contracts, integration of real-world data through oracles, decentralized applications (dApps), layer-2 tokens, swaps within DEXs, and automated market makers (AMMs). These come together to foster a rich environment for MEV opportunities. Zero-knowledge-proof-based schemes, such as STARKex, could theoretically avoid some of these issues, but this trade-off would come with other complexities.

කැත: (3) ස්මාර්ට් කොන්ත්‍රාත්තු ප්‍රකාශනය

The MEV opportunities are so lucrative on some chains that there are “MEV trading firms” bringing in “high five figures, mid six figures” in profits a month. This trend has become so prominent that there are public dashboards dedicated to scanning for profitable opportunities on Ethereum and සෝලානා. Their profitability is generated by executing the full basket of MEV strategies: front-running, sandwich trading, token arbitrage, back-running, and liquidations to name a few. Each exploiting a different smart contract dynamics for profit.

මෙම සමහර MEV උපාය මාර්ග ස්ථරය-1 සහ ස්ථරය-2 යන දෙකටම අදාළ වේ.

Generalized Front-Running: Bots scan the mempool for profitable transactions, and then front-run the original transaction for a profit.Sandwich Trading: The attacker places orders both before and after a large transaction to manipulate asset prices for profit. This strategy leverages the predictable price movement caused by the large transaction.

එවිට ඇතැම් උපාය මාර්ග ස්ථර-2 ටෝකන සහ ස්මාර්ට් කොන්ත්‍රාත්තු සඳහා අනන්‍ය වේ.

Arbitrage Across Different DEXs: Bots exploit price differences for the same asset on various DEXs by buying low on one and selling high on another.Back-running in DeFi Bonding Curves: MEV bots capitalize on predictable price rises in DeFi bonding curves by placing transactions immediately after large ones, buying during uptrends, and selling for profit. DeFi Liquidations: MEV bots spot opportunities in DeFi lending where collateral values fall below set thresholds, allowing validator's to prioritize their transactions for buying the liquidated collateral at lower prices.

කොන්ත්රාත්තුවේ සංකීර්ණත්වය MEV හා සම්බන්ධ අභියෝගවලට සැලකිය යුතු ලෙස දායක වේ.

Re-entrancy Attacks: These attacks exploit smart contract logic flaws, allowing attackers to repeatedly call a function before the first execution completes, extracting funds multiple times. In the context of MEV, skilled individuals can significantly profit from this, particularly in contracts with substantial funds.Interconnected Contracts and Global State: On platforms like Ethereum, smart contracts can interact, leading to chain reactions across several contracts from a single transaction. This interconnectivity enables complex MEV strategies, where a transaction in one contract may impact another, offering a chain reaction of profit opportunities.

මෙහි ඇති ගැටලුවේ කොටසක් නම්, ලේයර්-2 මත ගොඩනගා ඇති ටෝකන සහ dApps විසින් නිර්මාණය කරන ලද සම්පූර්ණ අගය බොහෝ විට ලේයර්-1 හි blockchain හි දේශීය වත්කම්වල අගය ඉක්මවන අතර, ගාස්තු මත පදනම්ව ගනුදෙනු තෝරාගැනීමට සහ තහවුරු කිරීමට වලංගු කරන්නන්ගේ දිරිගැන්වීම යටපත් කරයි.

තත්වය වඩාත් නරක අතට හැරීම සඳහා, මෙම අවස්ථා බොහොමයක් ජාල වලංගු කරන්නන්ට දැඩි ලෙස සීමා නොවේ. MEV ස්කෑනිං බොට් සහිත අනෙකුත් ජාල සහභාගිවන්නන්ට මෙම අවස්ථා සඳහාම තරඟ කළ හැකි අතර, ජාල තදබදය, ගෑස් ගාස්තු ඉහළ නැංවීම සහ ගනුදෙනු පිරිවැය ඉහළ නැංවීමට හේතු වේ. මෙම තත්ත්වය ජාලයට සහ එහි භාවිතා කරන්නන්ට සෘණාත්මක බාහිර බවක් ඇති කරයි, ඔවුන් සියල්ලන්ටම ඉහළ ගනුදෙනු ගාස්තු වල මිල බලපානු ඇත, දාමය අඩු කාර්යක්ෂමතාවයක් සහ ක්‍රියාත්මක වීමට වඩා මිල අධික වේ. DeFi හි MEV කෙතරම් සුලභද යත්, පරිශීලකයින් එය ජාලයේ සිටින සෑම කෙනෙකුටම නොපෙනෙන බද්දක් ලෙස පිළිගෙන ඇත.

මෙම MEV අවස්ථා ස්වභාවිකවම ඉහළ ප්‍රකාශිත ස්මාර්ට් කොන්ත්‍රාත්තුවේ අතුරු ඵලයක් ලෙස මතුවන්නේද, නැතහොත් සම්පුර්ණයෙන් වැඩසටහන්ගත කළ හැකි මුදල් සිහිනයට විකල්ප මාර්ගයක් තිබේද?

Short of avoiding protocols with highly expressive smart contracts and layer-2 tokens, users can avoid some of these risks by utilizing protocols that support රහස්‍ය ගනුදෙනු, like Liquid, that conceal transaction details. But unlike these platforms with more expressive scripting languages, Bitcoin lacks the ability to do things you would expect to be able to do with programmable money.

යහපත: වැඩසටහන්ගත කළ හැකි මුදල් වෙත වෙළඳාම

When considering the evolution of smart contracts on Bitcoin the options we’re given are to (1) push the complexity off-chain, (2) cautiously integrate narrow or limited covenant functionalities, or (3) embrace the path of full expressivity. Let’s explore some of the proposals from each of these options.

(1) Off-Chain ගිවිසුම් සඳහා නව ව්‍යුහයක්: ඕනෑම පූර්ව

Off-chain solutions, like the Lightning Network, aim to enhance Bitcoin’s scalability and functionality without burdening the mainchain, keeping transactions fast and fees low. This all sounds good so far.

SIGHASH_ANYPREVOUT (APO) යනු ගනුදෙනුවකට අත්සන් කිරීමෙන් පසුව පවා යම් යම් ගැලපීම්වලට ඉඩ සලසන නව ආකාරයේ පොදු යතුරක් සඳහා වන යෝජනාවකි. එය ගනුදෙනු යාවත්කාලීන වන ආකාරය සරල කරයි, ගනුදෙනුවලට පෙර (UTXOs) වෙත පහසුවෙන් යොමු වීමට ඉඩ සලසයි, අකුණු ජාල නාලිකා වේගවත්, ලාභදායී, ආරක්ෂිත සහ වඩාත් සරල කරයි, විශේෂයෙන් ආරවුල් විසඳීමේදී.

Under the hood, APO is a new proposed type of sighash flag. Every Bitcoin transaction must have a signature to prove it’s legitimate. When creating this signature, you use a “sighash flag” to determine which parts of the transaction you’re signing. With APO a sender would sign all outputs and none of the inputs, to commit the outputs of the transaction, but not specifically which transaction the funds are going to come from.

APO enables එල්ටූ, allowing users to exchange pre-signed transactions off-chain. However APO may inadvertently introduce MEV by making transactions reorderable. As soon as you allow a signature that’s binding the transaction graph you have the ability to swap out transactions. Inputs can be swapped, as long as the new inputs are still compatible with the signature.

(2) ගිවිසුම්: CAT + CSFS සහ CTV

ගනුදෙනුවකදී වේග සීමාවන් පැනවීම හෝ කාසි සඳහා නිශ්චිත ගමනාන්ත සැකසීම මගින් කාසි චලනය කළ හැක්කේ කොතැනද යන්න පාලනය කිරීමට ගිවිසුම් පරිශීලකයින්ට ඉඩ සලසයි. ගිවිසුම් වල විවිධ කාණ්ඩ දෙකක් ඇත: පුනරාවර්තන සහ පුනරාවර්තන නොවන.

Recursive covenants allow coins to continually return to covenants of the same type.Non-recursive covenants limit this control to the next transaction, requiring the entire future path of the coins to be defined upfront.

CAT + CSFS is a covenant proposal that allows scripts to construct or define certain parts of a future transaction. CHECKSIGFROMSTACK (CSFS) verifies a signature against the data that OP_CAT constructed. By using CSFS to require the signature to match some dynamically constructed format from OP_CAT, we can define how these UTXOs can be spent in the future and create a recursive covenant, albeit clunkily.

OP_CHECKTEMPLATEVERIFY (CTV) යනු පුනරාවර්තන නොවන ගිවිසුම් නිර්මාණය කිරීමේ ක්‍රමයකි. ගනුදෙනුවක නිශ්චිත කොටස් නිර්වචනය කිරීම සහ සත්‍යාපනය කිරීම වෙනුවට, CTV ඔවුන් යා යුතු නිශ්චිත ඊළඟ ලිපිනය සඳහන් නොකර අරමුදල් වියදම් කළ හැකි ආකාරය සීමා කරයි. එය ඊළඟ ගනුදෙනුව තහවුරු කළ යුතු "සැකිල්ලක්" නිර්වචනය කරයි.

One risk with recursive covenants might be possible to create a scenario where coins must follow a set of rules that repeat over and over, that get trapped in a loop without a way of getting out. Another is that, because covenants are transparent and self-executing they could open Bitcoin up to some of the MEV strategies we see on other chains.

මෙහි ඇති ශුභාරංචිය කුමක්ද?

ශුභාරංචිය නම් මෙම යෝජනා සියල්ලම නව ප්‍රකාශනයක් හඳුන්වා දීමයි!

දැන් අපට ලබාගත හැකි උපරිම ප්‍රකාශන ප්‍රමාණය කොපමණද?

(3) සම්පූර්ණ ප්රකාශනය: සරල බව

සරල බව is a blockchain-based programming language that differs from other scripting languages in that it is very low-level. It is not a language on top of Bitcoin Script or a new opcode within it, it’s an alternative to it. Theoretically, it’s possible to implement all covenant proposals within Simplicity, and implement many of the other contracts cypherpunks want from programmable money, but with less of the negative externalities of Ethereum.

Simplicity maintains Bitcoin’s design principle of self-contained transactions whereby programs do not have access to any information outside the transaction. Designed for both maximal expressiveness and safety, Simplicity supports formal verification and static analysis, giving users more reliable smart contracts.

Compare Simplicity to: (1) bitcoin covenant proposals and (2) scripting languages on other blockchains:

The covenant proposals on Bitcoin Script, though much simpler than Simplicity, lack the expressivity to handle fee estimation in Script, due to Bitcoin's lack of arithmetic functions. There is no way to multiply or divide, no conditionals or stack manipulations opcodes; it is also very hard to estimate a reasonable fee to be associated with a given contract or covenant. Users end up with spaghetti code, where 80% of their contract logic is dedicated to trying to determine what their fee rate should be. Making these covenant contracts super complicated and difficult to reason about.

The EVM has looping constructs which makes static analysis of gas usage very difficult. Whereas with Script or Simplicity, you can just count each opcode, or recursively add up the cost of each function. Because Simplicity has a formal model, you can formally reason about program behavior. You can't do this with Script even though you can do static analysis of resource usage.

ස්ථිතික විශ්ලේෂණය සහ විධිමත් සත්‍යාපනය වැනි අනෙකුත් වටිනා විශේෂාංග සමඟින් සරල බව මඟින් පරිශීලකයින්ට ඉහළම ප්‍රකාශනශීලී බවක් ලබා දෙනු ඇත. MEV වලට ප්‍රතිරෝධී වන ස්මාර්ට් කොන්ත්‍රාත්තු ගොඩ නැගීම සඳහා සීමා නොවුනත්, පරිශීලකයින් දිරිමත් කරනු ලැබේ. මීට අමතරව, විවිධ කොන්ත්‍රාත්තුවල එකතුවක් තනි තනිව සිදු නොකළත්, MEV හට ඇති විය හැක. මෙය මූලික වෙළඳාමක් නියෝජනය කරයි.

The idea of advancing Bitcoin’s smart contract functionality is undeniably promising and exciting. But it’s important to acknowledge that all these proposals carry some degree of MEV risk—albeit likely not to the extent that we see on other chains. As we think about bringing more programmable money to Bitcoin, there are questions we have to ask:

Can we build a protocol with zero MEV risk, or is this an unattainable ideal?Given the inherent risks of MEV in many proposals, what level of MEV risk is acceptable?And finally, what represents the simplest proposal that offers the greatest degree of expressivity?

සෑම යෝජනාවකටම තමන්ගේම වාසි සහ අවාසි ඇත. කෙසේ වෙතත්, අප කුමන දිශාවට ගමන් කළත්, අප සැමවිටම ඉලක්ක කළ යුත්තේ ආරක්ෂාවට ප්‍රමුඛත්වය දීම සහ විමධ්‍යගත කිරීමේ මූලධර්මය ආරක්ෂා කිරීමයි.

සවිස්තරාත්මක යාවත්කාලීන සහ වැඩි විස්තර සඳහා, ඇසින් තබා ගන්න බ්ලොක්ස්ට්රීම් පර්යේෂණ 𝕏 පෝෂණය.

This is a guest post by Kiara Bickers. Opinions expressed are entirely their own and do not necessarily reflect those of BTC Inc or Bitcoin සඟරාව.

මුල් මූලාශ්රය: Bitcoin සඟරාව