@perp/curie-contract
Advanced tools
Changelog
[2.2.0] - 2022-09-30
Vault.settleBadDebt()
InsuranceFund.repay()
Repaid
, BadDebtSettled
InsuranceFund.borrow()
Changelog
[2.1.1] - 2022-09-21
AccountBalance.getLiquidatablePositionSize()
returns entire position size if the position value is less than _MIN_PARTIAL_LIQUIDATE_POSITION_VALUE.Changelog
[2.1.0] - 2022-08-16
Vault.withdrawAll()
to withdraw all free collateral(specified) from vaultVault.withdrawAllEther()
to withdraw all ETH from vaultChangelog
[2.0.1] - 2022-08-10
DelegateApproval.canAddLiquidityFor
to check if can add liquidity for another maker.DelegateApproval.canRemoveLiquidityFor
to check if can remove liquidity belonging to another maker.Changelog
[1.4.0] - 2022-07-05
DelegateApproval
ClearingHouseOpenPosition
ClearingHouse.openPositionFor()
ClearingHouse.getDelegateApproval()
Changelog
[1.3.0] - 2022-06-20
BaseToken.cacheTwap
to offer the flexibility of updating index prices by either users or ourselves.Changelog
[1.2.0] - 2022-04-28
ClearingHouse.getAccountValue()
function now calls Vault.getAccountValue()
Vault.deposit()
, Vault.withdraw()
, Vault.depositFor()
can be used for non-settlement tokenVault
now supports depositing non-settlement token as collateralCollateralManager
contract for non-settlement collateral related params managementVault.depositEther()
, Vault.depositEtherFor()
Vault.withdrawEther()
for ETH deposit/withdrawVault.getAccountValue()
to get the account value in settlement token's decimalsVault.getBalanceByToken()
to query collateral balance by token addressVault.getCollateralTokens()
to query all non-settlement collateral token addresses of a traderVault.getFreeCollateralByToken()
to query free collateral by given collateral token addressesVault.getSettlementTokenValue()
to query trader's settlement token valueVault.isLiquidatable()
to check if a trader's non-settlement collateral can be liquidatedVault.getMarginRequirementForCollateralLiquidation()
to get the margin requirement that a trader's
non-settlement collateral is eligible to be liquidatedVault.getCollateralMmRatio()
to get the mmRatio for collateral liquidationVault.getLiquidatableCollateralBySettlement()
to get the liquidatable collateral amount by given
repaid settlement amountVault.getRepaidSettlementByCollateral
to get the repaid settlement amount by given collateral amount
for liquidationVault.getMaxRepaidSettlementAndLiquidatableCollateral()
to query the max repaid settlement amount and
max collateral amount for liquidationVault.liquidateCollateral
to liquidate trader's non-settlement collateralChangelog
[1.1.0] - 2022-04-12
BaseToken.pause()
(only owner)BaseToken.close(uint256)
(only owner)IBaseToken.close()
IBaseToken.getPausedTimestamp()
IBaseToken.getPausedIndexPrice()
IBaseToken.getClosedPrice()
IBaseToken.isOpen()
IBaseToken.isPaused()
IBaseToken.isClosed()
IVault.depositFor(address, address, uint256)
IClearingHouse.quitMarket(address, address)
PositionClosed
to ClearingHouse
, will emit in quitMarket(address, address)