Hyperliquid 백서

Hyperliquid

원문

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

her week, and the rebalance occured at 14:30 UTC on Wednesday every other week. The scale factor was set at time of rebalance so that the perp index value has a continuous change between old and new index definitions. The criterion for choosing subjects is top 20 subjects by price, 5k twitter followers, and filtering out outliers in trading activity and number of holders. If the community detects manipulation in a pending index change, the criterion may be adjusted accordingly. Beginning October 4, the`FRIEND-USD`index will track the average one-share buy price of the middle 8 subjects of the following 20 accounts: 0xCaptainLevi, Dingalingts, 0xRacerAlt, HsakaTrades, HerroCrypto, HanweChang, Christianeth, 0xLawliette, CL207, Cryptoyieldinfo, CapitalGrug, iloveponzi, cobie, sayinshallah, pokeepandaa, pranksy, VentureCoinist, 0xBreadguy, saliencexbt, blknoiz06. From September 13-October 4, the `FRIEND-USD` index tracked the following accounts: 0xRacerAlt, HsakaTrades, 0xCaptainLevi, HerroCrypto, cobie, CL207, 0xLawliette, blknoiz06, 0xSisyphus, Christianeth, Banks, Cryptoyieldinfo, lBattleRhino, CapitalGrug, saliencexbt, zhusu, basedkarbon, RookieXBT, xcurveth, Pancakesbrah. From September 13-20, the median price of the above 20 subjects was used instead of the average one-share buy price of the middle 8 subjects. The median price was scaled by `0.002469` to ensure a continuous transition from the previous index oracle (dated August 23-September 13). From August 23-September 13, the `FRIEND-USD` index tracked: ‘cobie’, ‘HsakaTrades’, ‘0xRacerAlt’, ‘Banks’, ‘zhusu’, ‘0xSisyphus’, ‘blknoiz06’, ‘RookieXBT’, ‘gainzy222’, ‘xcurveth’, ‘inversebrah’, ‘shrimppepe’, ‘0xLawliette’, ‘dingalingts’, ‘BigDickBull69’, ‘zachxbt’, ‘izebel\_eth’, ‘loomdart’, ‘icebergy\_’, and ‘saliencexbt’. The median price is scaled by `0.00431` to ensure a continuous transition from the previous TVL oracle. The contract from which the index is derived can be found here: <https://basescan.org/address/0xcf205808ed36593aa40a44f10c7f7c2f67d4a4d4>. Friendtech key prices are converted to USDT prices based on the robust CEX median ETH/USDT mid price. # Uniswap perpetuals Some perpetual contracts on Hyperliquid use Uniswap V2 or V3 AMM price as the underlying spot asset. These contracts are restricted to be isolated-only, which means that cross margin is not allowed and margin cannot be manually removed from an open position. Instead, the position must be partially or fully closed to partially or fully return isolated margin. Uniswap pool prices are always converted to USDT prices based on the robust CEX oracle prices. The current contract addresses for the Uniswap pools used as oracles: RLB: `0x510100d5143e011db24e2aa38abe85d73d5b2177` # Hyperps ### High level summary *Hyperps* (Hyperliquid-only perps) trade like vanilla perpetual contracts, but do not require an underlying spot or index oracle price. Instead, the funding rate is determined relative to a moving average hyperp mark price in place of the usual spot price. This makes the hyperp price more stable and less susceptible to manipulation, unlike usual pre-launch futures.&#x20; This new derivative design does not require an underlying asset or index that exists at all points of the hyperp's lifetime, only that the underlying asset or index eventually exists for settlement or conversion.&#x20; When trading hyperps, funding rates are very important to consider. If there is heavy price momentum in one direction, funding will heavily incentivize positions in the opposite direction for the next eight hours. As always, be sure to understand the contract before trading. ### Conversion to vanilla perps For a hyperp tracking ABC, shortly after when ABC/USDT is listed on Binance, OKX, or Bybit spot trading, ABC-USD will convert to a normal ABC-USD perp. ### Hyperp mechanism details Hyperps work just like normal perpetual contracts, except the external spot/index oracle price is replaced with an 8 hour exponentially weighted moving average of the last day's minutely mark prices.&#x20; Precisely, `oracle_price(t) = min[sum_{i=0}^1439 [(t - i minutes < t_list ? initial_mark_price : mark_price(t - i minutes)) * exp(-i/480)] * (1 - exp(-1/480)) / (1 - exp(-3)), intial_mark_price * 4]` Here `a ? b : c` evaluates to `b` if `a` is true and otherwise `c.` Samples are taken on the first block after each unix minute, but the timestamps used are the nearest exact minute multiples. When there are fewer than 480 mark price samples, the initial mark price is used as the padding value. Funding rate premium samples are computed as 1% of the usual clamped interest rate and premium formula. See Funding docs for more details. The mark price of Hyperps incorporate the weighted median of pre-launch perp prices from CEXs as a component in the usual mark price formula. Despite the often significantly different contract specifications between hyperps and other venues' pre-launch perp markets, they are nonetheless included as mark price inputs to provide greater mark price stability during volatility.&#x20; The mark price of hyperps are capped at 3x the 8-hour mark price EMA. Hyperps with external prelaunch perp listings have mark price capped to 1.5x the median external perp price (the third component of the mark price). The oracle price is also restricted to be at most 4 times the one month average mark price as an additional safeguard against manipulation. # Delisting Validators vote on whether to delist validator-operated perps. If validators vote to delist an asset, the perps will settle to the 1 hour time weighted spot oracle price before the scheduled delisting voting time. This is a settlement mechanism used by many centralized exchanges.&#x20; When an asset is delisted, all positions are settled and open orders are cancelled. Users who wish to avoid automatic settlement should close their positions beforehand. After settlement, no new orders will be accepted. # Market making There is no DMM program, special rebates / fees, or latency advantages. You can find the Python SDK here: <https://github.com/hyperliquid-dex/hyperliquid-python-sdk\\> \ If you have technical integration questions, it's recommended to start in the Discord channel for #api-traders: <https://discord.gg/hyperliquid> # Portfolio graphs The portfolio page shows account value and P\&L graphs on 24 hour, 7 day, and 30 day time horizons.&#x20; `Account value` includes unrealized pnl from cross and isolated margin positions, as well as vault balances.&#x20; Pnl is defined as `account value` plus net deposits, i.e. `account value + deposits - withdrawals`. Note that these graphs are samples on deposits and withdrawals and also every 15 minutes. Therefore, they are not recommended to precise accounting purposes, as the interpolation between samples may not reflect the actual change in unrealized pnl in between two consecutive samples. # Miscellaneous UI ### Max Drawdown The max drawdown on the portfolio page is only used on the frontend for users' convenience. It does not affect any margining or computations on Hyperliquid. Users who care about the precise formula can get their account value and pnl history and compute it however they choose. The formula used on the frontend is the maximum over times `end > start` of the value `(pnl(end) - pnl(start)) / account_value(start)`&#x20; Note that the denominator is account value and the numerator is pnl. Also note that this not equal to absolute max drawdown divided by some account value. Each possible time range considered uses its own denominator.&#x20; # Validators # Running a validator GitHub repository for detailed instructions on how to run a non-validator and validator: <https://github.com/hyperliquid-dex/node> Running validating and non-validating nodes is permissionless, meaning anyone can choose to do so. The active set of validators is determined transparently based on the top twenty-seven by stake. # Delegation program ### Overview Validators play a critical role in maintaining the integrity and efficiency of Hyperliquid. The Hyper Foundation Delegation Program is designed to:&#x20; * Enhance network security by delegating tokens to reliable and high-performing validators. * Promote diversity across the validator network to enhance decentralization. * Support validators committed to the growth and stability of the Hyperliquid ecosystem. Testnet performance will be a criterion for mainnet delegation, particularly when mainnet performance metrics are not available for a given validator. Delegations will be monitored on an ongoing basis. The Foundation reserves the right to cease delegation at any time. The Foundation validators will strongly consider participation in the Delegation Program as a factor for trusting peer validators. Those interested in running a mainnet validator are highly encouraged to apply for the Delegation Program before setting up a mainnet validator. ### Eligibility * You must have 10k HYPE in one address before applying. The minimum self-delegation amount is 10k HYPE. Note that the minimum self-delegation amount is locked for one year. * You must run at least two non-validator nodes with 95% uptime if your application is accepted. The IP addresses of these nodes will be shared publicly and attributed to you on documentation pages. Others will use your non-validators as seed nodes to connect to. The IP addresses must be static, e.g. using elastic IP addresses on AWS. Important: Do not open any non-validator ports to the public until an announcement to open up mainnet non-validators. Never open validator ports to the public. * You must comply with applicable laws and regulations.&#x20; * You must successfully complete KYC/KYB processes.&#x20; * You must not be from a restricted jurisdiction, which includes, but is not limited to, Ontario, the U.S., Cuba, Iran, Myanmar, North Korea, Syria, and certain Russian-occupied regions of Ukraine.&#x20; * The Foundation reserves the right to adjust the above eligibility criteria at any time. ### Apply * Fill out the [application form](https://forms.gle/Mheitp58BkjU1qK8A). * Following review of your application, you may be invited to provide KYC/KYB details. * If your application is accepted and KYC/KYB is completed, you will need to review and accept the Program Terms. # Referrals ### How do I refer someone to Hyperliquid? You can create a referral code on <https://app.hyperliquid.xyz/referrals> after you’ve done $10,000 in volume. You will receive 10% of referred users' fees, less any fee discount they receive. Referral rewards apply for a user's first $1B in volume and referral discounts apply for a user's first $25M in volume.&#x20; Share your referral code with other traders using a unique link: app.hyperliquid.xyz/join/YOURCODE.&#x20; Referral rewards accrue for all quote assets and can be claimed once >$1. Claimed referral rewards are reflected in your spot balance. &#x20; ### How do I use a referral code? Enter a referral code on <https://app.hyperliquid.xyz/referrals> or use a friend's referral link. Using a referral code will give you a 4% discount on your fees for your first $25M in volume. Referral discounts do not apply to vaults or sub-accounts because those are treated as independent accounts in the clearinghouse. # Proposal: Staking referral program *At this time, there is no definitive implementation for the staking referral program ready for mainnet. Based on extensive user and builder feedback, it is being re-evaluated to ensure fairness for all builders and a healthy builder ecosystem.*&#x20; Details for the original proposal for a staking referral program are below:&#x20; Builders and referrers who stake HYPE will be able to keep a percentage of their referred users’ trading fees, up to a maximum of 40% for builders and referrers at the highest staking tier. All builders and referrers with staked HYPE will automatically enjoy these benefits once the feature is enabled on mainnet. Furthermore, builders and referrers will be able to share up to 50% of the staking referral revenue back to the referred user. This allows referrers to offer better than the default rates to new users. ### What are builder codes and referral codes?&#x20; Builder codes allow interfaces routing through Hyperliquid to charge a custom fee on a per-order basis. This additional fee is called a builder fee and goes 100% to the builder. The new staking referral program is strictly more revenue for builders. Referral codes are applied when a user joins via a referral link. Unlike builder codes, referral codes are tied to users and apply regardless of how the user trades in perpetuity. Note that builder codes override referral codes for that order, and referral codes are disabled after the user trades $1B cumulative volume.&#x20; ### How it works The staking referral program interacts with staking tier fee discounts and the VIP tier fee schedule. If a builder or referrer has a higher staking tier than their referred user on a trade, they keep up to 100% of the difference. The percentage kept by the builder or referrer decreases as the volume tier of the referred user increases, starting at 100% for VIP 0 and ending at 40% for VIP 6.&#x20; As an example: Alice has 100k staked HYPE, which gives a trading fee discount of 30%. Bob has 100 staked HYPE, which gives a trading fee discount of 10%, and Bob is at VIP 1. If Bob uses Alice’s builder or referral code, Alice can keep (30% - 10%) \* 90% = 18% of the fees that Bob pays. Alice could share with Bob up to 9% of his fees. In other words, Bob could receive up to a 9% trading fee discount using Alice’s builder or referral code.&#x20; <table><thead><tr><th width="140.3671875">VIP tier</th><th width="208.53515625">14d weighted volume ($)</th><th width="265.47265625">Amount kept by builder or referrer</th></tr></thead><tbody><tr><td>0</td><td></td><td>100%</td></tr><tr><td>1</td><td>>5M</td><td>90%</td></tr><tr><td>2</td><td>>25M</td><td>80%</td></tr><tr><td>3</td><td>>100M</td><td>70%</td></tr><tr><td>4</td><td>>500M</td><td>60%</td></tr><tr><td>5</td><td>>2B</td><td>50%</td></tr><tr><td>6</td><td>>7B</td><td>40%</td></tr></tbody></table> *Note these tiers correspond to the fee schedules in* [Fees](/hyperliquid-docs/trading/fees) # Points The points program began on November 1, 2023. 1,000,000 points were distributed weekly to users for 6 months, ending May 1, 2024. Points are meant to reward users who contribute to the protocol’s success. Affiliates earned 1 point for every 4 points their referred users earned. Points criteria was updated on a recurring basis. Points distributions were based on weekly activity ending Wednesdays at 00:00 UTC. Distributions took place on Thursdays. Points were also distributed for the closed alpha period up through October 31, 2023. The L1 phase of points began on May 29, 2024 and ended in November 2024. 700,000 points were distributed weekly. Activity from May 1-28, 2024 received a multiplier. Hyperliquid reserves the right to modify previous point distributions under its sole discretion. # Historical data ### Exporting additional user trade history The Enigma team has built an interface for users to export trade history <https://trade-export.hypedexer.com/?v=1>. This is a third-party integration that is independently maintained. Any issues or feedback should be reported directly to the maintainers.&#x20; ### Market Data (for advanced users) The examples below use the AWS CLI (see <https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html>) and LZ4 (<https://github.com/lz4/lz4> or install from your package manager). Note that the requester of the data must pay for transfer costs. #### Asset data Historical data is uploaded to the bucket `hyperliquid-archive` approximately once a month. **There is no guarantee of timely updates and data may be missing.**&#x20; L2 book snapshots are available in market\_data and asset contexts are available in asset\_ctxs. No other historical data sets are provided via S3 (e.g. candles or spot asset data). You can use the API to record additional historical data sets yourself.&#x20; Format: `s3://hyperliquid-archive/market_data/[date]/[hour]/[datatype]/[coin].lz4` or `s3://hyperliquid-archive/asset_ctxs/[date].csv.lz4` ``` aws s3 cp s3://hyperliquid-archive/market_data/20230916/9/l2Book/SOL.lz4 /tmp/SOL.lz4 --request-payer requester unlz4 --rm /tmp/SOL.lz4 head /tmp/SOL ``` #### Trade data `s3://hl-mainnet-node-data/node_fills_by_block` has fills which are streamed via `--write-fills --batch-by-block` from a non-validating node. Older data is in a different format at `s3://hl-mainnet-node-data/node_fills)` and `s3://hl-mainnet-node-data/node_trades` . `node_fills` matches the API format, while `node_trades` does not. #### Historical node data `s3://hl-mainnet-node-data/explorer_blocks` and `s3://hl-mainnet-node-data/replica_cmds` contain historical explorer blocks and L1 transactions. &#x20;`s3://hl-mainnet-node-data/misc_events_by_block` contains non-trade events such as transfers, staking, and funding. # Bug bounty program ### In scope * On mainnet, any bug that would cause an outage or logical error on nodes or API servers is in scope.&#x20; * Experimental features on testnet are not in scope, unless otherwise announced in [Discord](https://discord.gg/hyperliquid) or Telegram announcements, though bug reports are still appreciated for these features. ### Submission process * Write a report regarding the bug and include detailed reproduction steps and a proof of concept to validate your findings. Submit your report to <bugbounty@hyperfoundation.org>. * If the same bug is reported by multiple individuals or entities, the first report will be honored.&#x20; * Rewards will be paid in USDC on Hyperliquid for responsible disclosure of bugs based on their severity.&#x20; * We agree not to pursue legal action in respect of any research conducted in good faith and in compliance with this program.&#x20; * The time and energy that go into all bug reports is deeply appreciated. ### Prohibited activity&#x20; * Testing on mainnet code; all testing should be done on testnet or local forks. * Phishing or other social engineering attacks. * Extended, large scale DDOS attacks. Attacks involving mishandling of temporary spikes in load are allowed. * Testing with third-party systems and applications (e.g. browser extensions) as well as websites (e.g. SSO providers, advertising networks). * Submitting ransom demands or threats. * Publicly disclosing a bug report before it has been fixed and paid. * Threatening to publish or publishing anyone’s personally identifiable information or other sensitive information without their consent. * Exploiting vulnerabilities for personal financial gain beyond the rewards described in this program. * Attempting to bypass these procedures or engaging in unauthorized activities outside the outlined scope. ### Eligibility * You must submit your report to <bugbounty@hyperfoundation.org>. Do not use external sites.&#x20; * You must comply with the KYC/KYB policy and procedures.&#x20; * You must be able to receive USDC on Hyperliquid.&#x20; * You must maintain confidentiality regarding vulnerabilities and communications until authorized for disclosure by us. * We must be able to reproduce your findings. All bounty submissions will be paid out based on their classification. Classification examples are subject to change. &#x20; * Contributors to the development of the code being tested are not eligible to participate in the program in relation to such code. ### Ineligibility * Reports lacking sufficient detail, including step-by-step instructions, reproducible examples, or proof of concept. * Vulnerabilities that require highly unlikely or unreasonable user behavior to exploit. * Vulnerabilities caused by outdated software,
프로젝트로 돌아가기