ohtradeदस्तावेज़
ट्रेडिंग खोलें ↗

प्रोटोकॉल नियंत्रण और समापन

> Updated reference (English); translation pending.

The protocol separates normal account exit from a whole-protocol wind-down. An individual can close settled, unused account state through rent management while trading remains open for everyone else.

Operator controls

Authorized roles manage keeper identities, operational limits, market configuration and emergency actions. A keeper publishes prices and submits permitted execution; the administrator manages the applicable roles and settings. The auction relayer is a separate identity from every price keeper.

Market settings can change for future opens. Existing positions retain the terms saved when they opened. Operators can pause new opens and use the defined market-retirement or equity-settlement procedures for remaining positions.

The program is upgradeable while its upgrade authority is retained. An upgrade changes executable rules for later interactions. Review deployment information and published updates alongside these Docs.

The exit sequence

  1. Stop new activity and resolve open positions, pending requests and sell orders.
  2. Collect execution obligations and apply the eligible debt repayment resources.
  3. Settle ordinary rewards and referral matching, and return user balances and staking principal through the exit paths.
  4. Fix final LP distribution rights and process the remaining account refunds.
  5. Close eligible protocol accounts and return their rent to the recorded payers.

System-owned stakes leave before final LP sharing. They do not join the user distribution. User final-distribution rights remain recorded even when their principal has already been returned through an exit action.

If no user is staked

When OH has been issued but there is no user stake at wind-down, the protocol opens a 24-hour OH registration window. Registered amounts share the final user LP allocation pro rata. The window accepts exact remaining OH, including small and fractional balances.

OH registered in this window remains in custody until registration closes. After the deadline, principal can be returned through the applicable exit path without reducing its recorded final-distribution weight.

If nobody registers before the window closes, the remaining final LP is assigned to the fixed administrator beneficiary after prior obligations are handled. Later changes of administrator cannot redirect an already fixed beneficiary.

Unpaid debt and the seven-day fallback

After an exit request has been open for seven days, the remaining defined steps can be advanced by other callers. Before final debt settlement, positions and pending collateral must be cleared and the legally available repayment sources exhausted.

The final procedure pays available money in FIFO order and preserves already funded credits across batches. Only the unfunded remainder can be written off after eligible repayment assets have been exhausted. For example, with 150 USDC and two consecutive 100 USDC claims, the first receives 100 and the second receives 50; only the latter's remaining 50 is written off. The caller cannot choose a later creditor ahead of the queue head.

This is a terminal settlement rule. Normal operation continues to use FIFO repayment and the ordinary reserve protections described in the pools.

Rent at the end

Protocol account refunds follow the recorded rent payer and account dependencies. User wallet token accounts and the standard OH mint follow their own Solana account rules. Closing the ProgramData account is a final authority-controlled action after protocol shutdown; keeping upgrade authority is necessary for that refund path.

Local V11 implementation

This V11 build supports fresh deployments only. Its changed account discriminators and layouts must be decoded with the matching release's sdk/idl/perp.json and SDK; legacy accounts cannot be reinterpreted or upgraded in place by this build. The intent wire version is separate from the account ABI.

Holding upgrade authority does not make incompatible accounts migratable. A fresh V11 deployment does not erase or settle obligations of the old deployment. Preserve its user balances, FIFO claims, income-time reward ownership and historical records; resolve them through that deployment's supported settlement and exit paths. Do not close old program or data accounts merely because a new program is available.

V11 स्थानीय कार्यान्वयन

यह V11 बिल्ड केवल नए परिनियोजन के लिए है। बदले खाते के पहचानकर्ता और संरचना उसी रिलीज़ के sdk/idl/perp.json व SDK से पढ़ें; पुराने खाते पुनर्व्याख्यायित या उसी स्थान पर अपग्रेड नहीं हो सकते। Intent संदेश संस्करण खाता ABI से अलग है।

अपग्रेड अधिकार असंगत खातों के स्थानांतरण की अनुमति नहीं बन जाते। नया V11 पुराने परिनियोजन की देनदारी मिटाता या चुकाता नहीं। शेष, FIFO दावे, आय उत्पन्न होने के समय का पुरस्कार स्वामित्व और इतिहास सुरक्षित रखें तथा पुराने परिनियोजन के निपटान व निकास मार्ग अपनाएँ। नया प्रोग्राम उपलब्ध होने भर से पुराने प्रोग्राम या डेटा खाते बंद न करें।

← पिछला
जमा, निकासी और अंदर के बैलेंस
अगला →
अपना ऐप या ट्रेडिंग Agent बनाएँ