File tree Expand file tree Collapse file tree 1 file changed +5
-11
lines changed
Expand file tree Collapse file tree 1 file changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -205,7 +205,7 @@ export class UserPnlSettlerBot implements Bot {
205205 // Initial settlement
206206 await this . trySettleNegativePnl ( ) ;
207207 await this . trySettleUsersWithNoPositions ( ) ;
208- await this . trySettlePositivePnlForLowMargin ( ) ;
208+ // await this.trySettlePositivePnlForLowMargin();
209209
210210 // Set up intervals
211211 this . intervalIds . push (
@@ -521,15 +521,7 @@ export class UserPnlSettlerBot implements Bot {
521521
522522 // For negative PnL, check if user can be settled
523523 if ( userUnsettledPnl . gt ( ZERO ) ) {
524- const canSettlePositivePnl = await this . canSettlePositivePnl (
525- user ,
526- userUnsettledPnl ,
527- perpMarketIdx ,
528- spotMarketIdx
529- ) ;
530- if ( ! canSettlePositivePnl ) {
531- return { shouldSettle : false } ;
532- }
524+ return { shouldSettle : false } ;
533525 } else {
534526 // only settle negative pnl if unsettled pnl is material
535527 if ( ! userUnsettledPnl . abs ( ) . gte ( this . minPnlToSettle . abs ( ) ) ) {
@@ -781,7 +773,9 @@ export class UserPnlSettlerBot implements Bot {
781773 logger . info (
782774 `${ logPrefix } Settling ${ sortedParams . length } users in ${ Math . ceil (
783775 sortedParams . length / SETTLE_USER_CHUNKS
784- ) } chunks for market ${ marketIndex } `
776+ ) } chunks for market ${ marketIndex } with respective PnLs: ${ sortedParams
777+ . map ( ( p ) => p . pnl )
778+ . join ( ', ' ) } `
785779 ) ;
786780
787781 await this . executeSettlementForMarket (
You can’t perform that action at this time.
0 commit comments