Skip to content

Latest commit

 

History

History
376 lines (234 loc) · 15 KB

CHANGELOG.md

File metadata and controls

376 lines (234 loc) · 15 KB

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

[Unreleased]

Features

Fixes

Breaking

[2.25.0] - 2023-04-13

Features

  • sdk: add BNB perp market
  • program: update to anchor 0.26.0 (#428)
  • program: add modify_order ix (#422)
  • sdk: more accurate calculation of insurance stake value during unstake request (#426)

Fixes

  • sdk: fix isOracleValid confidenceTooLarge calc (#425)

  • sdk: Remove redundant fetchAccounts in userMap.ts

Breaking

[2.24.0] - 2023-04-03

Features

  • program: ability to delete a market that was just initialized (#413)
  • program: revenue pool wont settle to IF if utilization unhealthy (#402)

Fixes

  • program: add ctx.accounts.insurance_fund_vault.reload()? after vault updates (#402)

Breaking

[2.23.0] - 2023-04-03

Features

  • program: include usdc oracle (#397)
  • ts-sdk: add addAllUsers to DriftClient
  • program: program: when checking if user is idle, let balanceType be borrow if scaled balance is 0 (#397)

Fixes

Breaking

[2.22.0] - 2023-03-23

Features

  • sdk: add isUserBankrupt (#399)
  • program: update revenue pool fund settlement logic (#398)

Fixes

  • sdk: fix claimable pnl (#384)
  • program: borrow liquidity check accounts for if user has borrow or deposit (#400)
  • program: slightly relax withdraw limits (#400)
  • sdk: filter undefined accounts (#406)

Breaking

[2.21.0] - 2023-03-19

Features

  • program: account for openbook referrer rebate being greater than quote sold (#394)
  • sdk: add sync to UserMap and UserStatsMap (#395)
  • program: revert fill ix (#391)
  • program: flag users as idle on-chain (#386)

Fixes

Breaking

[2.20.0] - 2023-03-10

Features

  • program: add referrer name account to enforce unique referrer names (#357)
  • program: only let amm fill up to tick above/below user limit price (#381)
  • program: allow multiple makers in fill_perp_order (#341)
  • sdk: add getPerpMarketExtendedInfo to drift client

Fixes

Breaking

[2.19.0] - 2023-03-01

Features

  • program: allow post only to match older taker limit orders (#378)
  • ts-sdk: serum subscriber supports websockets (#365)
  • program: max number of subaccounts to 3000
  • program: amm spread logic more consistent across market by using liquidity ratio rather than base asset amount for inventory spread scaling(#374)
  • program: add pyth1M/pyth1K as OracleSource (#375)

Fixes

Breaking

[2.18.0] - 2023-02-24

Features

  • program: account for contract tier in liquidate_perp_pnl_for_deposit (#368)
  • program: simplifications for order fills (#370)
  • program: block atomic fills (#369)
  • program: allow limit orders to go through auction (#355)
  • program: improve conditions for withdraw/borrow guard (#354)

Fixes

  • ts-sdk: fix resolvePerpBankrupcty to work with all perp market indexes
  • ts-sdk: getTokenAmount uses divCeil (#371)
  • program: allow limit orders to have explicit zero auction duration passed in params (#373)

Breaking

[2.17.0] - 2023-02-17

Features

  • program: order params utilize post only enum (#361)

Fixes

  • program: twap tweaks, update only on new cluster time (#362)

Breaking

[2.16.0] - 2023-02-14

Features

  • sdk: add support for market lookup table (#359)
  • program: tweak calculate_size_premium_liability_weight to have smaller effect on initial margin (#350)
  • ts-sdk: updates for accounting for spot leverage (#295)
  • ts-sdk: added new methods for modifying orders to include spot and more params (#353)
  • ts-sdk: flagged old modifyPerpOrder and modifyPerpOrderByUserOrderId as deprecated

Fixes

  • ts-sdk: DLOB matching logic accounts for zero-price spot market orders not matching resting limit orders
  • ts-sdk: new squareRootBN implementation using bit shifting (2x speed improvement)
  • program: fix overflow in calculate_long_short_vol_spread (#352)
  • program: dont let users disable margin trading if they have margin orders open
  • program: tweaks to fix max leverage order param flag with imf factor (#351)
  • program: improve bid/ask twap calculation for funding rate stability (#345)
  • ts-sdk: fix borrow limit calc (#356)

Breaking

[2.15.0] - 2023-02-07

Features

  • ts-sdk: add aptos

Fixes

Breaking

[2.14.0] - 2023-02-06

Features

  • program: flag to set max leverage for orders (#346)
  • program: do imf size discount for maintainance spot asset weight (#343)
  • ts-sdk: new liquidation price to account for delta neutral strategies (#340)
  • ts-sdk: add txParams to all instructions, bump @solana/web3.js (#344)

Fixes

  • program: extend time before limit order is considered resting (#349)
  • ts-sdk: improve funding rate prediction
  • program: block jit maker orders from cross vamm
  • program: cancel_order_by_user_order_id fails if order is not found

Breaking

[2.13.0] - 2023-01-31

Features

  • program: perp bankruptcies pay from fee pool before being socialized (#332)
  • ts-sdk: add calculateAvailablePerpLiquidity
  • program: enforce min order size when trading against amm (#334)

Fixes

  • ts-sdk: fix the getBuyingPower calculation
  • ts-sdk: improved perp estimated liq price formula (#338)
  • ts-sdk: update methods to account for new leverage formula (#339)

Breaking

[2.12.0] - 2023-01-22

Features

  • program: allow for 2000 users
  • program: add resting limit order logic (#328)
  • ts-sdk: add calculateEstimatedSpotEntryPrice
  • ts-sdk: add ability to add priority fees (#331)
  • ts-sdk: new calculateEstimatedPerpEntryPrice that accounts for dlob & vamm (#326)

Fixes

  • program: better rounding for openbook limit price
  • program: fix paying fee_pool_delta when filling with open book
  • program: bitflags for exchange status (#330)
  • program: update fee calculation for filling against openbook
  • program: relax conditions for valid oracle price in fulfill_perp_order
  • program: handle fallback price when amm has no liquidity (#324)
  • sdk: add getRestingLimitBids/Asks to DLOB (#325)
  • program: tweak oracle price used for determine_perp_fulfillment_methods

Breaking

[2.11.0] - 2023-01-11

Features

  • program: remove canceling market orders with limit price after first fill
  • program: try to match against multiple of makers orders (#315)
  • program: limit number of users to 1500
  • program: more rigorous risk decreasing check in place_perp_order/place_stop_order

Fixes

  • program: avoid overflow when calculating overflow (#322)
  • ts-sdk: fix user.getUnrealizedPnl to account for lp position
  • program: cancel market order for not satisfying limit price only if there was some base asset amount filled

Breaking

[2.10.0] - 2023-01-03

Features

  • program: place order returns early if max ts breached (#317)
  • ts-sdk: batch getMultipleAccount calls in bulkAccountLoader (#315)
  • program: add clippy deny for panic, expect and unwrap
  • program: add market index offset trait (#287)
  • program: add size trait to accounts and events (#286)

Fixes

  • program: add access control for spot market updates similar to perp market (#284)
  • ts-sdk: allow websocket subscriber to skip getAccount call to rpc (#313)
  • ts-sdk: always add market account for cancelOrders if market index included
  • anchor tests: make deterministic to run in ci (#289)
  • ts-sdk: fix deprecated calls to @solana/web3.js (#299)
  • ts-sdk: fix calculateAssetWeight for Maintenance Margin (#308)
  • ts-sdk: fix UserMap for websocket usage (#308)

Breaking

[2.9.0] - 2022-12-23

Features

  • program: use vamm price to guard against bad fills for limit orders (#304)

Fixes

  • ts-sdk: expect signTransaction from wallet adapters to return a copy (#299)

Breaking

[2.8.0] - 2022-12-22

Features

  • program: add force_cancel_orders to cancel risk-increasing orders for users with excessive leverage (#298)

Fixes

  • program: fix calculate_availability_borrow_liquidity (#301)
  • program: fix casting in fulfill_spot_order_with_match to handle implied max_base_asset_amounts
  • sdk: fix BulkAccountLoader starvation (#300)

Breaking

[2.7.0] - 2022-12-19

Features

Fixes

program: more leniency in allowing risk decreasing trades for perps (#297) program: fix is_user_being_liquidated in deposit

Breaking

[2.6.0] - 2022-12-16

Features

program: allow keeper to switch user status to active by calling liquidate perp (#296)

Fixes

  • program: more precise update k in prepeg (#294)
  • program: allow duplicative reduce only orders (#293)
  • program: fix should_cancel_reduce_only_order
  • ts-sdk: add Oracle OrderType to dlob idl

Breaking

[2.5.0] - 2022-12-13

Features

Fixes

  • program: disable lower bound check for update amm once it's already been breached (#292)
  • ts-sdk: fix DLOB.updateOrder (#290)
  • ts-sdk: make calculateClaimablePnl mirror on-chain logic (#291)
  • ts-sdk: add margin trading toggle field to user accounts, update toggle margin trading function to add ability to toggle for any subaccount rather than just the active (#285)

Breaking

[2.4.0] - 2022-12-09

Features

  • program: check if place_perp_order can lead to breach in max oi (#283)
  • program: find fallback maker order if passed order id doesnt exist (#281)

Fixes

  • program: fix amm-jit so makers can fill the full size of their order after amm-jit occurs (#280)

Breaking

[2.3.0] - 2022-12-07

Features

Fixes

  • program: update the amm min/max_base_asset_reserve upon k decreases within update_amm (#282)
  • program: fix amm-jit erroring out when bids/asks are zero (#279)
  • ts-sdk: fix overflow in inventorySpreadScale

Breaking

[2.2.0] - 2022-12-06

Features

  • ts-sdk: add btc/eth perp market configs for mainnet (#277)
  • program: reduce if stake requirement for better fee tier (#275)
  • program: new oracle order where auction price is oracle price offset (#269).
  • program: block negative pnl settles which would lead to more borrows when quote spot utilization is high (#273).

Fixes

  • ts-sdk: fix bugs in calculateSpreadBN
  • ts-sdk: fix additional bug in calculateSpreadBN (negative nums)

Breaking