Hyperliquid 백서

Hyperliquid

원문

bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 27쪽 중 3쪽

k&#x20; 1. HYPE/QUOTE should have 50k QUOTE size on both sides within a spread of 0.5%, inclusive USDC and USDT are not subject to the staking requirement due to their longstanding track record and established scale.&#x20; The 200k HYPE staked by the deployer are subject to slashing based on validator vote for poor quality quote assets. Upon deployment, this stake is committed for 3 years, after which it can be unstaked. This gives builders and users some assurance when choosing a quote asset.&#x20; For any of the conditions above, if there is a three-day period during which the condition is not satisfied for a majority of uniformly spaced 1 second samples, the quote asset will be considered slashable. Validators will vote on the amount to slash when such conditions are violated.&#x20; Becoming a quote asset is now permissionless on testnet, where the staking requirement is 50 HYPE for ease of testing. Once the requirements above are met, the token deployer sends an `enableQuoteToken` transaction to convert the token into a quote token. This deployer action is irreversible and has no gas cost.&#x20; Transfer fees for new accounts can be paid in 1 unit of a spot quote asset. # Aligned quote assets The Hyperliquid protocol supports “aligned stablecoins” as a permissionless primitive for stablecoin issuers to leverage Hyperliquid’s unique distribution and scale together with the protocol. The motivation behind alignment is to introduce an opt-in setting for new stablecoin teams to bootstrap their network effects and share upside proportionally with the protocol. Similar to the builder-protocol synergy of permissionless spot listings, HIP-3, and builder codes, aligned stablecoins are part of the infrastructure to move all of finance onchain. ### AQAv2 Based on user and deployer feedback, the AQAv2 spec extends the designation of “aligned quote asset” to stablecoins that are not exclusive to Hyperliquid. Under AQAv2, stablecoin deployers share approximately 90% of cost-adjusted reserve yield revenue on their Hyperliquid supply with the protocol.&#x20; AQAv2 will be a requirement for quote assets to be listed against HIP-4 and validator-operated perp markets on a future network upgrade. There is no trading fee or volume contribution benefit to AQAv2. Other quote assets will continue to be supported for other markets, including spot and HIP-3 perps.&#x20; AQAv2 allows specification of a “technical deployer” and a “treasury deployer.” The treasury deployer will designate a treasury address which will share 100% of the AQA rate (the cost-adjusted onchain reference rate oracle) with the protocol through the onchain AQA mechanic. This is twice the rate of revenue share of the existing AQA spec. The treasury deployer must stake 500k HYPE, which is slashable if the treasury address does not have sufficient balance for onchain revenue to be deducted. The technical deployer must stake 500k HYPE and ensure reliable mint, redemption, and cross-chain transfer infrastructure for the aligned quote asset. Both treasury and technical deployers require 6 months minimum notice before ceasing operation, during which their stake is slashable for the commitments above. The activation of AQAv2 is by validator vote, after both deployers have staked and sent the authorization transactions from the staking accounts. Under AQAv2, the linked HyperEVM contract that connects to HyperCore will also rebalance with the treasury address. The HyperEVM balance corresponding to minted HyperCore tokens will be held in a ratio of 9:1 between the treasury address and technical deployer’s linked EVM contract address, respectively. Reserve yield revenue accrues in 30 day intervals based on the block on each UTC date, automatically sent to the Assistance Fund 8 days after each interval completes. In the event that there is insufficient balance to deduct from the system interest address `0x50...00 + {token_index}` , the treasury deployer's stake is eligible to be slashed at an interest rate of 2% per day. The 30 day intervals begin on the date of activation. As a concrete example ``` Jan 1: X1 = balance at 0 UTC, RATE1 = AQA-publisher effective rate, published onchain by validators Jan 2: X2, RATE2 (analogously defined) ... Jan 31: X31, RATE31 Feb 1: X32, RATE32 Feb 7: X38, RATE38 Feb 28: X59, RATE59 Mar 1: X60, RATE60 System interest address pays X1 * RATE1 + X2 * RATE2 + ... X30 * RATE30 on Feb 7 at 0 UTC System interest address pays X31 * RATE31 + ... + X60 * RATE60 on Mar 9 at 0 UTC ``` ### AQAv1 AQAv1 offers lower trading fees, larger market maker rebates, and higher volume contribution toward fee tiers when used as the quote asset for a spot pair or the collateral asset for HIP-3 perps.&#x20; **Onchain requirements:** 1. Enabled as a permissionless quote token 2. 800k additional staked HYPE by deployer, meaning a total of 1M staked HYPE including the 200k staked HYPE for the quote token deployment. This is to give builders and users assurance to use the aligned stablecoin. 3. 50% of the AQA rate flows to the protocol. Validators may vote to update the calculation methodology as regulatory standards evolve. The AQA rate is updated according to an onchain stake-weighted median of validator-reported values. A CoreWriter action allows the deployer to reflect the exact minted balance from HyperEVM directly to HyperCore, allowing a fully automated fee share mechanism as part of L1 execution. **Offchain requirements, enforced through onchain quorum of validator votes:** 1. The stablecoin is 1:1 backed by cash, short-term US treasuries, and tokenized US treasury or money market funds to the extent permitted under applicable regulatory frameworks. Aligned issuers must also provide par redemption at all times, with a publicly disclosed and timely redemption service consistent with their applicable regulatory regime. These conditions can be revisited by the validators, in the spirit of building a regulatorily compliant chain for payments and banking opportunities. The guiding requirement is that a large percentage of the world's circulating dollars could compliantly be converted to the aligned stablecoin in the context of existing businesses and use cases in the financial world. 2. The full supply is natively minted on HyperEVM. Any supply on other chains or offchain must first be minted on HyperEVM as the source chain. 3. The deployer can only deploy assets that directly support the aligned stablecoin. For example, the underlying treasuries could be issued onchain. The net effect is that the deployer must share half of its offchain yield income through the existence of the aligned stablecoin. The deployer and its affiliates may not receive any economic benefits tied to conversion of the aligned stablecoin into another asset. "Benefit" includes but is not limited to revenue share, order-flow payments, or any form of rate-linked compensation. 4. The team building an aligned stablecoin must be independent and dedicated to building on Hyperliquid.&#x20; **AQAv1 benefits, applied to spot and perp trading:** 1. 20% lower taker fees&#x20; 2. 50% larger maker rebates 3. 20% more volume contribution toward fee tiers Offchain conditions are ultimately voted upon by validator quorum, as any such conditions are not able to be reflected directly in protocol execution. Like on most other blockchains, independent validators on Hyperliquid achieve consensus on a self-contained state machine’s execution. This state machine’s evolution is entirely onchain. In the case of the offchain conditions for an aligned stablecoin, this evolution is driven by validator vote. # HyperEVM The Hyperliquid blockchain features two key parts: HyperCore and HyperEVM. The HyperEVM is not a separate chain, but rather, secured by the same HyperBFT consensus as HyperCore. This lets the HyperEVM interact directly with parts of HyperCore, such as spot and perp order books. ### What can I do on the HyperEVM?&#x20; Explore directories of apps, tools, and more built by community members: [ASXN](https://hyperscreener.asxn.xyz/ecosystem), [HypurrCo](https://www.hypurr.co/ecosystem-projects), and [HL Eco](https://hl.eco/projects). Visit the [HyperEVM onboarding FAQ](/hyperliquid-docs/onboarding/how-to-use-the-hyperevm) for more questions.&#x20; ### Why build on the HyperEVM? Builders can plug into the onchain order book liquidity of HyperCore via the HyperEVM. In addition, many Hyperliquid users are early adopters and want to try new onchain financial applications. See the [HyperEVM developer section](/hyperliquid-docs/for-developers/hyperevm) for more technical details and [tools for HyperEVM builders](/hyperliquid-docs/hyperevm/tools-for-hyperevm-builders) for resources. &#x20; As one example, a project XYZ could deploy an ERC20 contract on the HyperEVM using standard EVM tooling and deploy a corresponding spot asset XYZ permissionlessly in the HyperCore spot auction. Once the HyperCore token and HyperEVM contract are linked, users can use the same XYZ token on HyperEVM applications and trade it on the native spot order book. This has two key improvements compared to CEX listings: 1) The entire process is permissionless, with no behind-the-scenes negotiations for preferential treatment and 2) There is no bridging risk between HyperCore and HyperEVM as one unified state.&#x20; As another example, a lending protocol could set up a pool contract that accepts token XYZ as collateral and lends out another token ABC to the borrower. To determine the liquidation threshold, the lending smart contract can read XYZ/ABC prices directly from the HyperCore order books using a read precompile. For a Solidity developer, this is as simple as calling a built-in function. Suppose the borrower's position requires liquidation. The lending smart contract can send orders directly swapping XYZ and ABC on the HyperCore order books using a write system contract. Again, this is a simple built-in function in Solidity. In a few lines of code, the lending protocol has implemented protocolized liquidations similar to how perps function on HyperCore. A theme of the HyperEVM is to abstract away the deep liquidity on HyperCore as a building block for arbitrary user applications. ### What stage is the HyperEVM in?&#x20; The HyperEVM is in the alpha stage. There are three reasons behind this gradual roll-out approach.&#x20; First, this stays true to Hyperliquid’s “no insiders” principle; everyone has equal access and starts on a level playing field. The tradeoff is that HyperEVM did not launch with the same tooling you might see on other chains, since no one is given a heads up nor paid for an integration or marketing. These short-term obstacles are worth it to be a fair, credibly neutral platform in the long run.&#x20; Second, a gradual roll-out is the safest way to upgrade a complex system doing billions of dollars of volume a day and protect against performance degradation or downtime.&#x20; Third, shipping an MVP and iterating live with user feedback allows development to adjust more nimbly. Testnets are useful for technical testing, but systems can only be hardened through real economic use.&#x20; As such, higher throughput and write system contracts are not live on mainnet yet, but will be in due time.&#x20; # Tools for HyperEVM builders See the [Builder Tools section](/hyperliquid-docs/builder-tools/hyperevm-tools) # Hyperliquid Improvement Proposals (HIPs) # HIP-1: Native token standard HIP-1 is a capped supply fungible token standard. It also features onchain spot order books between pairs of HIP-1 tokens. The sender of the token genesis transaction will specify the following: 1. `name`: human readable, maximum 6 characters, no uniqueness constraints. 2. `weiDecimals`: the conversion rate from the minimal integer unit of the token to a human-interpretable float. For example, ETH on EVM networks has `weiDecimals = 18` and BTC on the Bitcoin network has `weiDecimals = 8`. 3. `szDecimals`: the minimum tradable number of decimals on spot order books. In other words, the lot size of the token on all spot order books will be `10 ** (weiDecimals - szDecimals)`. It is required that `szDecimals + 5 <= weiDecimals`. 4. `maxSupply`: the maximum and initial supply. The supply may decrease over time due to spot order book fees or future burn mechanisms. 5. `initialWei`: optional genesis balances specified by the sender of the transaction. This could include a multisig treasury, an initial bridge mint, etc. 6. `anchorTokenWei`: the sender of the transaction can specify existing HIP-1 tokens to proportionally receive genesis balances. 7. `hyperliquidityInit`: parameters for initializing the Hyperliquidity for the USDC spot pair. See HIP-2 section for more details. The deployment transaction of the token will generate a globally unique hash by which the execution logic will index the token. ### Gas cost for deployment Like all transactions, gas costs will ultimately be paid in the native Hyperliquid token. Currently, the following gas cost is in HYPE. 1. The gas cost of deployment is decided through a Dutch auction with duration 31 hours. In this period, the deployment gas decreases linearly from `initial_price` to `500 HYPE`. The initial price is `500 HYPE` if the last auction failed to complete, otherwise 2 times the last gas price. 2. Genesis to existing anchor token holders are proportional to `balance - 1e-6 * anchorTokenMaxSupply`at the time of the deployed token's genesis. If this value is negative, no genesis tokens are received. In particular, this means genesis holders must hold at least 0.0001% of the anchor token's max supply at genesis to be included in the deployed token's genesis. 3. Potential workaround for constraint (2): a small initial USDC gas fee (value TBD) for the initial state update of each `(address, token)` pair, either through trading or transfer. Further trades and transfers to initialized ledgers are gas free within the standard Hyperliquid fill rate conditions. ### IMPORTANT GAS DETAILS: The only time-sensitive step of the process is the very first step of deploying the token, where the deployer specifies name, szDecimals, and weiDecimals. This step is when the gas is charged and the token is locked in. It is recommended to take all the necessary time after this step to reduce errors. There is no time limit once the gas is paid. Deployment is a complex multi-stage process, and it is possible to get in a state where your deployment is stuck. For example, Hyperliquidity and total supply may be incompatible. It is the deployer's responsibility to try the exact deployment on testnet first: <https://app.hyperliquid-testnet.xyz/deploySpot>. Gas cannot be refunded if the deployment is stuck. ### Deploying existing assets One common deployment pattern is to use HyperCore's onchain spot order books for trading an asset that exists externally. For example, this includes assets bridged from other chains or tokenized RWAs like stablecoins. These deployers often use the HyperEVM for minting in order to leverage battle-tested multichain bridging, including the following options: * LayerZero: <https://docs.layerzero.network/v2/developers/hyperliquid/hyperliquid-concepts> * Axelar: <https://axelarscan.io/resources/chains> * Chainlink: <https://docs.chain.link/ccip/tools-resources/network-specific/hyperliquid-integration-guide> * Debridge: <https://docs.debridge.com/dmp-details/dmp/protocol-overview> * Wormhole: <https://wormhole.com/docs/products/messaging/get-started/> To deploy a HyperEVM minted ERC-20 token for trading on HyperCore, the deployer must pay the deployment gas cost in the permissionless HIP-1 Dutch auction on HyperCore detailed above. The gas cost pays for order book and HyperCore token states, which are charged to the deployer instead of future users. The ticker is a unique onchain identifier, but as with all onchain data, frontends may display a different name.&#x20; For the simplest setup, during the genesis step, the deployer can put the max supply (or `2^64-1` for maximum flexibility) in the system address. See [here](https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/hyperevm/hypercore-less-than-greater-than-hyperevm-transfers#system-addresses) for how system address is determined based on the HyperCore token index. Usually deployers of bridged assets elect not to use Hyperliquidity, which can be configured with the `noHyperliquidity` field. Once the HyperCore token and HyperEVM ERC-20 address are linked, transfers to the system address on the HyperEVM will reflect in the sender's HyperCore balance, and vice versa. It's highly recommended to test the exact setup on testnet.&#x20; ### USDC&#x20; USDC is currently used for all perps margining. With HIP-1, USDC also becomes a spot token with an atomic transfer between perps and spot wallet USDC. Spot USDC has `szDecimals = weiDecimals = 8` to allow for a wide range of HIP-1 token prices. ### Spot trading&#x20; HIP-1 tokens trade on order books parametrized by `base` and `quote` tokens, where limit orders are commitments to exchange `sz * 10 ** (weiDecimalsBase - szDecimalsBase)` units of the base token for `px * sz * 10 ** (weiDecimalsQuote - szDecimalsQuote)` units of the quote token. Any HIP-1 token will be initialized with a native spot order book where the quote token is Spot USDC. Trading of arbitrary pairs of native tokens can be enabled in the future. ### Trading fees&#x20; Native spot and perps order books share the same volume-based fee schedule for each address. Fees collected in non-USDC HIP-1 native tokens are sent to the deployer, i.e. the deployer's fee share defaults to 100%. The base token deployer can set this percentage in the range of \[0, 100%] but only lower than the previous value afterwards. The portion of base token fees that is not redirected to the deployer is burned. For other quote tokens besides USDC, the fees are sent to the Assistance Fund. Quote token deployers cannot configure a trading fee share. For legacy tokens that were deployed before the deployer fee share was implemented, deployers can increase the fee share once from zero to a positive value. After this one-time change, the fee share can only decrease. The deployer fee share for legacy tokens cannot be set back to exactly zero after being set to a positive value. ### Spot dust conversion Spot dusting occurs once a day at 00:00 UTC. All spot balances that are less than 1 lot size with notional value <= 1 USD will be dusted. Here, the notional value is computed as the prevailing mid price of the token against USDC, times the token balance. All users’ dust across a token is aggregated, and a market sell order is automatically submitted to the book. If the aggregate dust is smaller than one lot size, then that dust is burned. Otherwise, the USDC from the successfully converted dust will be allocated back to all dusted users on a weighted basis, where the weighting is equal to the user’s fraction of the aggregate dust.&#x20; Dusting will not occur if 1) the book is one-sided or 2) the amount of notional dust is too high such that the book would be impacted by this operation. For PURR, this is 10000 USDC; for all other tokens, this is 3000 USDC. Note: the amount of USDC received may be less than the notional amount computed from the mid because of slippage incurred while dusting or if there was insufficient liquidity to convert the total dust across all users.&#x20; # HIP-2: Hyperliquidity ### Motivation&#x20; Though HIP-1 is sufficient as a permissionless token standard, in practice it is often crucial to bootstrap liquidity. One of Hyperliquid's core design principles is that liquidity should be democratized. For perps trading, HLP can quote deep and tight liquidity based on CEX perp and spot prices, but a new model is needed for HIP-1 tokens that are in early phases of price discovery. Hyperliqui
프로젝트로 돌아가기