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.
- 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)
-
sdk: fix isOracleValid confidenceTooLarge calc (#425)
-
sdk: Remove redundant fetchAccounts in userMap.ts
- program: ability to delete a market that was just initialized (#413)
- program: revenue pool wont settle to IF if utilization unhealthy (#402)
- program: add ctx.accounts.insurance_fund_vault.reload()? after vault updates (#402)
- 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)
- 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)
- 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)
- 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
- 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)
- 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)
- 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)
- program: order params utilize post only enum (#361)
- program: twap tweaks, update only on new cluster time (#362)
- 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
- 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)
- ts-sdk: add aptos
- 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)
- 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
- 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)
- 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)
- 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)
- 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
- 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
- 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
- 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)
- 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)
- program: use vamm price to guard against bad fills for limit orders (#304)
- ts-sdk: expect signTransaction from wallet adapters to return a copy (#299)
- program: add force_cancel_orders to cancel risk-increasing orders for users with excessive leverage (#298)
- 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)
program: more leniency in allowing risk decreasing trades for perps (#297) program: fix is_user_being_liquidated in deposit
program: allow keeper to switch user status to active by calling liquidate perp (#296)
- 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
- 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)
- 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)
- program: fix amm-jit so makers can fill the full size of their order after amm-jit occurs (#280)
- 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
- 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).
- ts-sdk: fix bugs in calculateSpreadBN
- ts-sdk: fix additional bug in calculateSpreadBN (negative nums)