Font Size: a A A

Security Research And Application Of Automated Market Making Model For Decentralized Exchange

Posted on:2024-05-29Degree:MasterType:Thesis
Country:ChinaCandidate:J W ChenFull Text:PDF
GTID:2568307118487224Subject:Software engineering
Abstract/Summary:PDF Full Text Request
In recent years,the emergence of cryptocurrencies and programmable blockchain platforms has facilitated the research and deployment of Decentralized Exchange(DEX)protocols.These protocols allow different token assets to trade with each other without involving any centralized financial intermediaries.Automated Market Maker(AMM),the most popular current decentralized exchange market-making model,enables efficient automated order matching in immutable contracts by automatically adjusting asset prices based on a price formula.However,the openness of the blockchain and the latency of transactions have triggered security vulnerabilities in AMM.First,sandwich attacks,as a predatory trading strategy,extract millions of dollars in profits from traders every year,causing them huge financial losses.Secondly,attackers are also using the front-running trade to manipulate asset prices in AMM and thus attack vulnerable Decentralized Finance(De Fi)applications that reference AMM asset prices.Arbitrageurs are also actively extracting the value of AMM pools by balancing different AMM market prices,thus indirectly achieving a value extraction on liquidity providers.In addition,the AMM price formula(price curve)has a wide range of trading price adjustment,which leads to the same market in the same block of time often offering different asset prices,thus affecting trading fairness.Therefore,the contributions of this thesis to address the transaction security issues and transaction fairness of market making models for decentralized exchanges are mainly as follows:(1)To address the transaction security problem of market-making models on decentralized exchanges,this thesis proposes an Automated Reordering Market Maker(ARMM),a model that resists sandwich attacks,which blocks the manipulation of transactions by attackers through delayed trading and transaction reordering techniques.First,we design a delayed trade mechanism of commit-then-execut and avoiding the attacker’s observation and control of the trade state by introducing random values to participate in the trade ranking calculation.Second,we design a transaction reordering algorithm to resist the sandwich attack to improve the failure probability of the sandwich attack.In addition,we further extend the threat model to discuss the impact of cross-block sandwich attacks on transactions in detail for the first time and simulate it in our model.(2)To further address the trading fairness problem of market-making models in decentralized exchanges,this thesis proposes a Dynamic Curve-based Automated Market Maker(DCAMM),which utilizes a price oracle with real-time market price feedback to adjust the dynamic price curve by conform to market prices.In such a dynamic AMM,price manipulation is eliminated and traders’ slippage losses are converted into the liquidity pool,enabling the resistance of arbitrage trading and sandwich attack,and safeguarding the gains of traders and liquidity providers.In addition,during the market price fluctuations,DCAMM can provide a more stable and consistent asset rate through strictly price adjustment,benefiting traders and safeguarding trading fairness.(3)Finally,this thesis analyzes the security of the proposed two models and simulates their implementation in Ganache,the test chain of Ethereum,to verify their effectiveness through historical trading data.
Keywords/Search Tags:blockchain, decentralized exchange, automated market maker, sandwich attack, front-running
PDF Full Text Request
Related items