@@ -200,7 +200,6 @@ impl LPPool {
200
200
. safe_div ( swap_price_denom. cast :: < i128 > ( ) ?) ?
201
201
. cast :: < u128 > ( ) ?;
202
202
203
- msg ! ( "in_fee: {}, out_fee: {}" , in_fee, out_fee) ;
204
203
let out_fee_amount = out_amount
205
204
. cast :: < i128 > ( ) ?
206
205
. safe_mul ( out_fee as i128 ) ?
@@ -257,13 +256,6 @@ impl LPPool {
257
256
let lp_amount = if self . last_aum == 0 {
258
257
token_amount_usd. safe_div ( token_precision_denominator) ?
259
258
} else {
260
- msg ! ( "token_amount_usd: {}" , token_amount_usd) ;
261
- msg ! ( "dlp_total_supply: {}" , dlp_total_supply) ;
262
- msg ! ( "last_aum: {}" , self . last_aum) ;
263
- msg ! (
264
- "token_precision_denominator: {}" ,
265
- token_precision_denominator
266
- ) ;
267
259
token_amount_usd
268
260
. safe_mul ( dlp_total_supply as u128 ) ?
269
261
. safe_div ( self . last_aum . safe_mul ( token_precision_denominator) ?) ?
@@ -303,7 +295,6 @@ impl LPPool {
303
295
. cast :: < i64 > ( ) ?;
304
296
305
297
let lp_amount_less_fees = ( lp_burn_amount as i128 ) . safe_sub ( lp_fee_to_charge as i128 ) ?;
306
- msg ! ( "lp_amount_less_fees: {}" , lp_amount_less_fees) ;
307
298
308
299
let token_precision_denominator = 10_u128 . pow ( out_spot_market. decimals ) ;
309
300
@@ -322,7 +313,6 @@ impl LPPool {
322
313
. safe_div ( PERCENTAGE_PRECISION ) ?
323
314
. safe_div ( PERCENTAGE_PRECISION ) ?
324
315
. safe_div ( out_oracle. price . cast :: < u128 > ( ) ?) ?;
325
- msg ! ( "out_amount: {}" , out_amount) ;
326
316
327
317
let ( in_fee_pct, out_fee_pct) = self . get_swap_fees (
328
318
out_spot_market,
@@ -337,8 +327,6 @@ impl LPPool {
337
327
0 ,
338
328
) ?;
339
329
let out_fee_pct = in_fee_pct. safe_add ( out_fee_pct) ?;
340
- msg ! ( "out_fee_pct: {}" , out_fee_pct) ;
341
- msg ! ( "out_amount: {}" , out_amount) ;
342
330
let out_fee_amount = out_amount
343
331
. safe_mul ( out_fee_pct. cast :: < u128 > ( ) ?) ?
344
332
. safe_div ( PERCENTAGE_PRECISION ) ?
@@ -353,9 +341,6 @@ impl LPPool {
353
341
trade_notional : i128 ,
354
342
kappa_inventory : u64 ,
355
343
) -> DriftResult < i128 > {
356
- msg ! ( "notional_error: {}" , notional_error) ;
357
- msg ! ( "trade_notional: {}" , trade_notional) ;
358
- msg ! ( "kappa_inventory: {}" , kappa_inventory) ;
359
344
notional_error
360
345
. safe_mul ( -1_i128 ) ?
361
346
. safe_mul ( trade_notional. signum ( ) as i128 ) ?
@@ -476,9 +461,6 @@ impl LPPool {
476
461
out_target_weight : Option < i64 > ,
477
462
correlation : i64 ,
478
463
) -> DriftResult < ( i128 , i128 ) > {
479
- msg ! ( "in target weight: {}" , in_target_weight) ;
480
- msg ! ( "out target weight: {:?}" , out_target_weight) ;
481
-
482
464
let notional_trade_size =
483
465
in_constituent. get_notional ( in_oracle_price, in_spot_market, in_amount, false ) ?;
484
466
let out_amount = if out_oracle_price. is_some ( ) {
@@ -621,16 +603,13 @@ impl LPPool {
621
603
notional_trade_size,
622
604
) ?;
623
605
624
- msg ! ( "in_fee_execution_linear: {}" , in_fee_execution_linear) ;
625
- msg ! ( "in_fee_execution_quadratic: {}" , in_fee_execution_quadratic) ;
626
- msg ! ( "in_quadratic_inventory_fee: {}" , in_quadratic_inventory_fee) ;
627
- msg ! ( "out_fee_execution_linear: {}" , out_fee_execution_linear) ;
628
- msg ! (
629
- "out_fee_execution_quadratic: {}" ,
630
- out_fee_execution_quadratic
631
- ) ;
632
606
msg ! (
633
- "out_quadratic_inventory_fee: {}" ,
607
+ "fee breakdown - in_exec_linear: {}, in_exec_quad: {}, in_inv_quad: {}, out_exec_linear: {}, out_exec_quad: {}, out_inv_quad: {}" ,
608
+ in_fee_execution_linear,
609
+ in_fee_execution_quadratic,
610
+ in_quadratic_inventory_fee,
611
+ out_fee_execution_linear,
612
+ out_fee_execution_quadratic,
634
613
out_quadratic_inventory_fee
635
614
) ;
636
615
let total_in_fee = in_fee_execution_linear
0 commit comments