File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed
contract/contracts/predifi-contract/src Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -1691,20 +1691,16 @@ impl PredifiContract {
16911691 // Protocol fee: deducted from pool before distribution (flat fee_bps, no dependency on 317)
16921692 let config = Self :: get_config ( & env) ;
16931693 let fee_bps_i = config. fee_bps as i128 ;
1694- let protocol_fee_total = SafeMath :: percentage (
1695- pool. total_stake ,
1696- fee_bps_i,
1697- RoundingMode :: ProtocolFavor ,
1698- )
1699- . map_err ( |_| PredifiError :: InvalidAmount ) ?;
1694+ let protocol_fee_total =
1695+ SafeMath :: percentage ( pool. total_stake , fee_bps_i, RoundingMode :: ProtocolFavor )
1696+ . map_err ( |_| PredifiError :: InvalidAmount ) ?;
17001697 let payout_pool = pool
17011698 . total_stake
17021699 . checked_sub ( protocol_fee_total)
17031700 . ok_or ( PredifiError :: InvalidAmount ) ?;
17041701
17051702 // Winnings = user's share of the payout pool (after fee)
1706- let winnings =
1707- Self :: calculate_winnings ( prediction. amount , winning_stake, payout_pool) ;
1703+ let winnings = Self :: calculate_winnings ( prediction. amount , winning_stake, payout_pool) ;
17081704
17091705 // Verify invariant: winnings ≤ total_stake (INV-4)
17101706 assert ! ( winnings <= pool. total_stake, "Winnings exceed total stake" ) ;
You can’t perform that action at this time.
0 commit comments