Injective Protocol官方文档翻译(九) -清盘、清算(Liquidation)

本文介绍了Injective Protocol中清盘清算的概念,特别是`liquidatePositionWithOrders`方法,该方法涉及查询最新价格和资金费用、执行资金支付、检查并清算头寸以及创建Maker的头寸,最终关闭一定数量的合约。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

一、清盘、清算(Liquidation)

liquidation
英 [ˌlɪkwɪˈdeɪʃn]
美 [ˌlɪkwɪˈdeɪʃn]
n. 清盘; 清算; 清偿;
[例句]If the banks opt to pull the rug from under the ill-fated project, it will go into liquidation.
如果这些银行不再对这个倒霉的项目提供支持,它也就破产了。

1. 用订单清算头寸(liquidatePositionWithOrders)

Calling liquidatePosition will perform the following steps:
调用liquidatePosition将执行以下步骤:

  1. Query the oracle to obtain the most recent price and funding fee.
    查询oracle以获取最新的价格和资金费用。

  2. Execute funding payments on the existing position and then update the existing position state.
    对现有头寸执行资金支付,然后更新现有头寸状态。

  3. Check that the existing position (referenced by positionID) is valid and can be liquidated (i.e. that the maintenance margin requirement is breached.
    检查现有头寸(由positionID引用)是否有效,是否可以清算(即是否违反了维护保证金要求)。

  4. Create the Makers’ Positions.
    创造Makers’ Positions。

    这一步,具体步骤,参考原文,TODO。

  5. Close the lResults.quantity quantity contracts of the existing position.
    关闭lResults.quantity 数量个已存在头寸。

    这一步,具体步骤,参考原文,TODO。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值