ByteTrade Lab:以 GMX 为例,详解链上永续合约协议的创新之道

资讯 2024-06-23 阅读:121 评论:0
ByteTrade Lab:以 GMX 为例,详解链上永续合约协议的创新之道 Bytetrade Lab: Take GMX as an example and elaborate o...
美化布局示例

欧易(OKX)最新版本

【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   全球官网 大陆官网

币安(Binance)最新版本

币安交易所app【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   官网地址

火币HTX最新版本

火币老牌交易所【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   官网地址

ByteTrade Lab:以 GMX 为例,详解链上永续合约协议的创新之道

Bytetrade Lab: Take GMX as an example and elaborate on the innovative approach to the eternal contract agreement in the chain

免责声明:本文旨在传递更多市场信息,不构成任何投资建议。文章仅代表作者观点,不代表MarsBit官方立场。

Disclaimer: This paper is intended to convey more market information and does not constitute any investment proposal.

小编:记得关注哦

Editor: Keep an eye on it.

来源:Bytetrade Lab等

Source: Bytetrade Lab et al.

原文标题:Innovations of On-Chain Perpetual Protocols Part 1

Original title: Innovations of On-Chain Technical Projects Part 1

FTX 暴雷事件余波未止,去中心化和透明度越来越受到关注。交易活动从CeFi迁移到DeFi不是“是否”的问题,而是一个“何时”的问题。

There is growing concern about decentralisation and transparency as the after-effects of the FTX thunderstorm continue. The movement of transactions from CeFi to DeFi is not a question of whether or not, but of when.

在过去几个月,像GMX这样的永续合约协议备受关注。在GMX的独特设计之上,已经发展出一个独立的生态系统。

Over the past few months, durable contracts such as GMX have received attention. On the unique design of GMX, an independent ecosystem has been developed.

要点速览

GMX完全在链上运作,并使用AMM功能来实现杠杆交易。

GMX operates entirely on the chain and leverages transactions using the AMM function.

在GMX上,交易者完全了解对手方的情况,这与在CEX上交易完全不同

On GMX, the dealer knows everything about his opponent, which is completely different from the deal on CEX.

GMX与其他永续合约协议如dydx不同,它完全在链上运作,并使用AMM功能来实现杠杆交易。

Unlike other durable contractual agreements such as dydx, GMX operates entirely on the chain and leverages transactions using the AMM function.

GLP池包括50%的稳定币和50%的蓝筹资产($ETH, $BTC,$UNI和$LINK)。GMX使用GLP池为交易者提供4个代币/美元交易对。

The GLP pool consists of 50% stability currency and 50% blue finance product ($ETH, $BTC, $UNI and $LINK). GMX uses the GLP pool to provide four token/dollar transactions for traders.

GMX运营双代币模式: $GLP和$GMX。

GMX operates double-currency mode: $GLP and $GMX.

$GLP是LP的“流动性证明”收据,而$GMX是协议的效用和治理代币。

$GLP is the LP's “liquidity certificate” receipt, while $GMX is the validity of the agreement and the governing token.

GMX上的交易是零和游戏:

The deal on GMX is a zero-sum game:

如果交易者赢,LP就输。如果交易者输,LP就赢。

If the dealer wins, the LP loses. If the dealer loses, the LP wins.

GMX的主要好处:

GMX main benefit:

1.零滑点

1. Slippering points

2.高资本效率

2. Capital efficiency

GMX的主要挑战:

GMX Key Challenges:

1.LP面临的交易偏差

1. Transaction deviations faced by LP

2.无法平衡未平仓合约(OI)

2. Unbalanced Unsaved Contract (OI)

3.预言机操纵

3. Predictor manipulation

4.缺少交易对

4. Lack of transactional right

GMX

GMX是一个去中心化的现货和永续交易所,为交易者提供高达50倍杠杆的资产交易能力。该协议目前在Arbitrum和Avalanche上运行。在每个链上提供4个代币/美元对进行交易。

GMX is a decentralised off-the-shelf and permanent exchange that provides traders with up to 50 times the leverage of asset trading capacity. The agreement is currently running on Arbitrum and Avalanche.

在GMX上,交易者完全了解对手方的情况,这与在CEX上交易完全不同。GMX与其他永续合约协议如dydx不同,它完全在链上运作,并使用AMM功能来实现杠杆交易。

On GMX, traders are fully aware of the counterparty, which is completely different from dealing on CEX. Unlike other permanent contracts like dydx, GMX operates entirely on the chain and uses the AMM function to leverage the transaction.

单一的多资产池

single multi-asset pool

与其他以单一资产流动性池运作的DEX相比,GMX上的流动性提供者(LP)向单一的多资产池提供流动性。

The liquidity provider (LP) on GMX provides liquidity to a single multi-asset pool compared to other DES operating in a single liquidity pool.

LP通过铸造$GLP来提供流动性。$GLP是一种跟踪相关指数价格变动的资产。$GLP是LP的“流动性证明”收据。

The LP provides liquidity by casting $GLP. $GLP is an asset to track price movements in related indices. $GLP is the LP's “liquidity certificate” receipt.

Arbitrum上的$GLP池是一个指数,由大约50%的稳定币($USDC、$USDT、$FRAX、$MIM)和50%的蓝筹代币($ETH、$BTC、$LINK和$UNI)组成。

The $GLP pool on Arbitrum is an index consisting of about 50 per cent stability currency ($USDC, $USDT, $FRAX, $IM) and 50 per cent blue preparation currency ($ETH, $BTC, $LINK and $UNI).

上图显示出$GLP池的大部分由USDC、$ETH和$BTC组成。

The above figure shows that the bulk of the $GLP pool consists of USDDC, $ETH and $BTC.

$GLP可以:

$GLP can:

1.使用任何一个标的指数资产进行铸造

1. Use of index assets at any of the targets for casting

2.被销毁以赎回任何相关指数资产

2. Destroyed to redeem any relevant index assets

多资产池内的资产被用于交易,交易者可以采取任何方向的杠杆头寸。

Assets in multi-asset pools are used for transactions and traders can leverage positions in any direction.

30倍做多ETH示例

30 times more than the ETH example

一个交易商发布了1 $ETH的抵押品,并在GMX上建立了30倍的$ETH多头头寸。该交易者秘密地从资金池中借入29 $ETH,创建30 $ETH的多头敞口。根据交易结果,$GLP池会受到不同的影响。

A dealer issued a $1-ETH collateral and built a 30-fold $-ETH multi-head position on GMX. The dealer borrowed $29-$-ETH in secret from the pool, creating a 30-$-ETH multi-head open. Depending on the outcome of the transaction, the $-GLP pool will be affected differently.

如果交易者盈利,他从$GLP池中提取(1+盈利)$ETH。

If the dealer makes a profit, he withdraws $1 (+ profit) ETH from the $GLP pool.

如果交易者亏损,他从$GLP池中提取(1-亏损)$ETH。

If the dealer loses, he withdraws $1-(1-deficit) from the $GLP pool.

交易结果转化为GMX的未平仓合约(OI)的差异。$GLP池直接受到交易结果和方向的影响。因此,有必要重新平衡$GLP池内的资产权重。

The result of the transaction is the difference in the unwinded contract (OI) that is converted to GMX. The $GLP pool is directly influenced by the outcome and direction of the transaction. There is therefore a need to rebalance the weight of assets in the $GLP pool.

GMX 通过 2 种方法对$GLP池进行再平衡:

GMX Rebalancing $GLP Pool by 2 methods:

1. $GLP造币/销毁费折扣

1. $GLP discounts on currency / destruction costs

如上所述,LP能够用任何基础指数资产来铸造$GLP。由于OI决定了对资产的要求,在池子里的每项资产都有一个目标权重。因此,GMX提供较低的$GLP造币费和较高的$GLP销毁费,鼓励每种资产向其目标权重靠拢。

As noted above, the LP can use any underlying index asset to create $GLP. Since OI determines the asset requirements, each asset in the pool has a target weight. GMX therefore provides a lower $GLP cost and a higher $GLP cost of destruction, encouraging each asset to align with its target weight.

为了便于理解,用一个极端的例子来解释上表:

For ease of understanding, the table above is explained by an extreme example:

以$UNI为例,它在$GLP池中比重最大。通过用$UNI铸造$GLP,LP可以支付最低的造币费。相反,用$GLP铸造$UNI,LP将支付最高的造币费。

In the case of $UNI, it has the largest share in the $GLP pool. By casting $UNI, the LP pays the lowest currency-making fee. On the contrary, using $ULP, the LP pays the highest currency-making fee.

2.交易费用折扣

2. Discounts on transaction costs

除了进行杠杆交易,用户还可以通过GMX在不同的指数资产之间进行交易。GMX试图拉高换取低权重资产的成本,来重新平衡$GLP池。

In addition to leveraging transactions, users can trade between different index assets through GMX. GMX attempts to rebalance the $GLP pool by increasing the cost of low weight assets.

参照上图,交易$UNI(从$GLP池中移除$UNI这一低权重资产)的费用较高,为0.52%,而交易$USDT(从$GLP池中移除$USDT这一高权重资产)的费用较低,为0.34%。

By reference to the above figure, the transaction cost of $UNI (remove $UNI as a low weight asset from $GLP) was higher at 0.52 per cent, while the transaction cost of $USDT (remove $USDT as a high weight asset from $GLP) was lower at 0.34 per cent.

代币经济学

Monetic Economics

GMX采用的是双代币模式:$GLP与$GMX

GMX uses a double-currency model: $GLP and $GMX

$GLP

$GLP是LP的“流动性证明”收据。

$GLP is LP's “liquidity certificate” receipt.

要注意的是:

It should be noted that:

持有$GLP将使LP面临$GLP池中基础资产的价格变动。

Possession of $GLP will expose LP to changes in the price of base assets in $GLP pools.

LP在$GLP上获得的收益率取决于2个方面:1)交易量 2)交易员的损失

The LP rate of return on $GLP depends on two aspects: 1) volume of transactions 2) losses of traders

在GMX上提供流动性是零和游戏:由于交易结果直接影响$GLP池,LP总是交易的对手方。

The provision of liquidity on GMX is a zero-sum game: LP is always the counterparty to the transaction, as the outcome of the transaction directly affects the $GLP pool.

GMX的主要优点

the main advantages of GMX

1. GMX上的交易员享受零滑点

1. Dealers on GMX enjoy smooth spot

滑点的定义是交易的预期价格和交易执行价格之间的差异。

The slide point is defined as the difference between the expected price of the transaction and the price of the transaction execution.

GMX使用定制预言机从3个CEX(Binance、Coinbase和BitFinex)提取价格实现“零滑点”。FTX之前也在这三大CEX中,但后被Coinbase取代。

GMX achieved a “sliding spot” using a custom-made forecaster from three CEX (Binance, Coinbase and BitFinex) prices. FTX was also in the three CEXs before, but was replaced by Coinbase.

2. 高资本效率

2. Capital efficiency

杠杆的启用使GMX拥有极高的资产利用率,这对$GLP LP来说意味着更高的收益。在高峰期,GMX的AUM每日使用率接近300%。

Leveraging allows GMX to have a very high asset utilization rate, which means a higher gain for $GLP LP. The AUM usage rate for GMX is close to 300% per day during peak periods.

与PancakeSwap这样的现货DEX相比,Pancake Swap的资产利用率只有大约15.0%(计算方法为交易量/TVL=433.5/2900=~15.0%)。

Compared to spot DEX such as PancakeSwap, the utilization rate of Pancake Swap's assets was only about 15.0 per cent (based on transaction volume/TVL = 433.5/2900 = ~ 15.0 per cent).

GMX的主要挑战

the main challenge of GMX

1.LP可能面临交易偏斜

1. LP may face trade bias

在强劲的趋势性市场(牛市/熊市)中,可能会出现特殊的OI倾斜。在这种情况下,交易者可能会单方面进入多头或空头。

In a strong trend market (Cow/ Bear City), a special OI is likely to be tilted. In this case, traders may unilaterally enter multiple or empty positions.

例如,在牛市中,大多数交易者希望做多。当交易者持有多头头寸时,该资产就从$GLP池中“出借”。参考上面的数字,在2021年9月,多头OI为97%。在交易者赚取暴利的情况下,$GLP池的资产($ETH或$BTC)持有量可能会被抽空。

For example, in the cattle market, most traders want to do more. When the dealer holds multiple positions, the asset is “borrowed out” from the $GLP pool. See above, in September 2021, the figure was 97%.

需要注意的是,在2021年9月,GMX只有大约100个用户。因此,交易偏度很容易受到更大额交易的影响。随着用户数量的增长,将更不容易影响协议的整体交易偏度。

It should be noted that in September 2021, GMX had only about 100 users. As a result, trade bias is easily influenced by larger transactions. As the number of users increases, it will be less likely to affect the overall trade bias of the agreement.

相反,在熊市中,当交易者大量做空市场,GLP池将付出稳定币,而指数内其他代币的价值继续下降。参考上面的数字,在2022年11月,空头OI达到了76%的峰值。

Conversely, in Bear City, when traders do a lot of empty markets, the GLP pool will pay a steady currency, while the value of the other currencies in the index continues to decline. By reference to the above figures, the empty OI peaked at 76% in November 2022.

在大多数空头交易员获利的情况下,$GLP的持有者将从这两方面受到影响:

Where most empty traders profit, the holder of $GLP will be affected in both ways:

(1) 稳定币流失

(1) Stable currency loss

相关资产价格下跌。

The price of the related assets fell.

理解了这一点,就可以理解空头偏斜对$GLP的持有者的影响比多头偏斜大。

To understand this, it can be understood that the impact of the head bias on the holders of $GLP is greater than that of the head.

3M公司的数据显示,交易并没有向一个方向严重偏斜。然而,鉴于最近FTX的失败,交易偏向于空头的比例为65%,2022年11月11日飙升至76.5%。

The data from 3M show that the transaction is not heavily skewed in one direction. However, given the recent failure of FTX, the proportion of transactions in favour of empty space was 65 per cent, rising sharply to 76.5 per cent on 11 November 2022.

总之,交易者在11月9日损失了将近3百万美元。

In sum, traders lost nearly $3 million on 9 November.

2.缺少OI平衡

2. Lack of OI balance

由于GMX没有平衡OI的内部机制,上述挑战就更严峻了。

This challenge is compounded by the fact that GMX does not have an internal mechanism to balance OI.

GMX根据资产的利用率来计算其资金费率。无论集中度如何,多头和空头的资金费率总是正的(也就是说,无论是多头还是空头,交易者总是需要支付费率)。

GMX calculates its fund rate based on the utilization rate of the asset. Regardless of concentration, the multi-faceted and empty fund rate is always positive (i.e., the dealer always has to pay the rate regardless of whether it is multi-faceted or empty).

在CEX上,资金费率融资率通常被用来平衡OI。由于资金费率是点对点支付的,所以它作为一个自然的催化剂,促进了点对点的价格收敛。

On CEX, the funding rate is usually used to balance OI. Since the funding rate is paid on a point-to-point basis, it serves as a natural catalyst and promotes a point-to-point price reduction.

当资金费率为正时,永续合约的价格高于现货价格。做多的交易商向做空的交易商支付资金。这激励了更多的交易者做空永续合约,使永续合约价格更接近现货价格。反之亦然。

When the funding rate is correct, the price of a permanent contract is higher than the spot price. More traders pay empty traders. This encourages more traders to make a permanent contract, bringing the price of a permanent contract closer to the spot price. And vice versa.

3.预言机操纵

3. Predictor manipulation

预言机在波动期间的错误定价/操纵有可能导致“有害套利”。

Mispricing/manoeuvring during a period of volatility of a prophesy machine may lead to “harmful arbitrage”.

为了解决这个问题,GMX使用了一个定制预言机,从3个CEX(Binance、Coinbase和BitFinex)检索中间价格。此外,价格在每个区块开始时进行更新——确保同一区块内的每笔交易收到相同的更新执行价格,有助于防止抢先交易。

To address this problem, GMX uses a custom-made foreword machine to retrieve intermediate prices from three CEX (Binance, Coinbase and BitFinex). Moreover, prices are updated at the beginning of each block - ensuring that each transaction in the same block receives the same updated enforcement price, which helps to prevent pre-empting transactions.

尽管协议尽力维护,这种预言机设计仍然容易受漏洞影响。9月,GMX在Avalanche上被一个交易员利用获利大约565,000美元。

In September, GMX was exploited by a trader on Avalanche for approximately $565,000.

要理解这个案例研究,我们必须了解几个因素。

To understand this case study, we need to understand several factors.

在GMX上开多/空头头寸不会影响CEX的价格。这是因为GMX始终是一个价格接受者,它从CEX提取价格。

Multiply/empty positions on GMX do not affect CEX prices. This is because GMX is always a price recipient and it extracts prices from CEX.

了解这一机制的交易员执行了以下步骤。他首先在GMX上开了一个$AVAX的杠杆多头头寸。随后,他在CEX上推高价格。当GMX上的价格反馈更新时,他关闭了他的多头,获利约565,000美元。

The trader who knew about the mechanism took the following steps. He first opened a leverage multi-head position on GMX at $AVAX. He then pushed the price higher on CEX. When the price feedback on GMX was updated, he closed his head and made a profit of about $565,000.

需要注意的是,这只能在流动性稀薄的时候执行,此时市场容易受到规模的影响。

It is important to note that this can only be done at a time of thin liquidity, when markets are vulnerable to scale.

为了解决这个问题,GMX临时对$AVAX的未平仓合约发布了一个正式的上限。理想情况下,应该不需要人工干预,因为交易限额应该只受$GLP池中资产的限制。

In order to solve this problem, GMX has provisionally issued a formal cap on the unsavory contract for $AVAX. Ideally, manual intervention should not be required, as the trading limit should be limited only to assets in the $AVAX pool.

4.缺少交易对

4. Missing transaction log

对于那些对交易代币感兴趣的交易者来说,GMX不是一个好的选择。目前,Arbitrum和Avalanche在GMX上都只有4个美元交易对。

GMX is not a good option for traders interested in trading tokens. At present, Arbitrum and Avalanche have only four dollar transactions on GMX.

作者机构简介

author agency profile

ByteTrade Lab总部位于新加坡,受海纳国际集团(SIG)亚洲风险投资基金和其他一些领先的机构投资者支持,包括INCE Capital、BAI Capital、Sky9 Capital和NGC Ventures,在2022年6月进行了4000万美元的A轮融资。

ByteTrade Lab, based in Singapore, was supported by the Heiner International Group (SIG) venture capital fund for Asia and a number of other leading institutional investors, including INCE Capital, BAI Capital, Sky9 Capital and NGC Ventures, with $40 million in round A financing in June 2022.

ByteTrade正在积极构建自有的Web3操作系统(OS),该系统基于开放的区块链-边缘节点-客户端(BEC)架构,是原始全堆栈互联网协议的去中心化版本,将大规模将用户和去中心化的互联网应用在Web3.0中采用,并最终将数据所有权归还给用户。

Bytetrade is actively constructing its own Web3 operating system (OS), which is based on an open block chain-side node-client (BEC) architecture, which is a decentralized version of the original whole stack of Internet protocols, which uses large-scale and decentralized Internet applications in Web3.0 and ultimately returns ownership of data to users.

除了作为Web3操作系统的构建者,ByteTrade还积极孵化和投资早期Web 3.0项目,以建立独家Web 3操作系统生态系统。ByteTrade致力于向Web3.0的建设者提供各种资源,包括但不限于:技术、产品定义、商业计划、GTM战略和资金。返回搜狐,查看更多

In addition to being the builder of the Web3 operating system, Bytetrade actively incubates and invests in the early Web 3.0 project to create an exclusive Web 3 operating system ecosystem. Bytetrade is committed to providing Web 3.0 builders with a variety of resources, including but not limited to: technology, product definition, business plan, GTM strategy and finance. return to search for more

责任编辑:

美化布局示例

欧易(OKX)最新版本

【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   全球官网 大陆官网

币安(Binance)最新版本

币安交易所app【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   官网地址

火币HTX最新版本

火币老牌交易所【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   官网地址
文字格式和图片示例

注册有任何问题请添加 微信:MVIP619 拉你进入群

弹窗与图片大小一致 文章转载注明

分享:

扫一扫在手机阅读、分享本文

上一篇:BTE币价格 下一篇:CCF YOCSEF武汉
发表评论
平台列表
美化布局示例

欧易(OKX)

  全球官网 大陆官网

币安(Binance)

  官网

火币(HTX)

  官网

Gate.io

  官网

Bitget

  官网

deepcoin

  官网
热门文章
  • 支付領域投下震撼彈!美國數位銀行Chime疑與GuardPay 神盾支付合作!

    支付領域投下震撼彈!美國數位銀行Chime疑與GuardPay 神盾支付合作!
    2020年,新冠肺炎(COVID-19)疫情加速數位貨幣進展。例如:2019年4月,國際清算銀行(BIS)的調查顯示,在全球66家中央銀行中,沒有一家計畫發行跨境支付的數位貨幣。惟到了2020年10月,BIS支付委員會主席康利夫(Jon Cunliffe)指出,肺炎疫情拉高民眾對無現金支付的需求,迫使各國加快數位貨幣的研發進程日本與韓國於2021年進入數位貨幣試驗階段。直到2019年12月,美國聯邦準備理事會(Fed)都尚無數位貨幣規劃,惟到了2020年2月,Fed已開始研擬...
  • 区块链:交易系统开发指南

    区块链:交易系统开发指南
    播报编辑《区块链:交易系统开发指南》使用通俗易懂的语言,从技术的角度详细介绍了区块链交易系统应有的功能架构及工作原理,让人们能够张开双臂轻松地拥抱区块链技术,享受区块链交易系统带来的惊喜与成就感。《区块链:交易系统开发指南》共分 7 章,第 1~2 章主要介绍区块链及数字货币的基本概念,以及各种公有链的 API 接口;第3~5 章主要介绍区块链交易系统的分类架构及功能; 6 章主要介绍区块链交易系统面临的问题及演进方向;第 7 章对全书做了总结。《区块链:交易系统开发指南》是...
  • 5.14加密货币价格:BTC突破6.2万美元以太坊和山寨币反映市场情绪

    5.14加密货币价格:BTC突破6.2万美元以太坊和山寨币反映市场情绪
    今天,随着比特币(BTC)的价格突破62 000美元的门槛,顶级加密货币的价格反弹了。 此外,以铁大幅上涨,维持在2 900美元的水平。 此外,其他顶尖山硬币,如索拉纳(SOL )、XRP、卡达诺(ADA )也大幅上涨。    今天密钥加密货币价格 1. 比特币价格    在5月14日星期二撰写本文时,比特币价格上升了2.57%,达到62 487.50美元。 另一方面,在过去24小时内,交易量从65.26 % 急剧上升至277亿美元。 与此同时,加密货币的市场价值为...
  • OKEx回应用户质疑:合约交易非期货 平台无机器人

    OKEx回应用户质疑:合约交易非期货 平台无机器人
       热点点 自选股份 数据中心 数据中心 研究和资料中心 资金流动 模拟交易 客户客户 具体来说,OKEx回答用户的问题:合同交易不是期货,平台不是机器人。 金融同步化,3月22日。    昨天下午,OKEx公司就维护先前用户线下的权利问题对同步财务公司作出了回应,指出OKEx公司提供的合同交易不是期货交易,在旗下的业务中没有正式的机器人。 同时,OKEX称,它不会以非法为由对任何投资损失索赔作出答复。 答复全文如下: 同步你的财务! 近日来,...
  • 0.00006694个比特币等于多少人民币/美金

    0.00006694个比特币等于多少人民币/美金
    0.00006694比特币等于多少人民币?根据比特币对人民币的最新汇率,0.00006694比特币等于4.53424784美元/32.5436 16人民币。比特币(BTC)美元(USDT)人民币(CNY)0.000066944.53424784【比特币密码】32.82795436 16比特币对人民币的最新汇率为:490408.64 CNY(1比特币=490408.64人民币)(1美元=7.24人民币)(0.00006694USDT=0.0004846456 CNY)汇率更新时...
标签列表