Fix multi payout calculation!
This commit is contained in:
		
							parent
							
								
									a32bb57167
								
							
						
					
					
						commit
						ff92338873
					
				| 
						 | 
					@ -138,8 +138,7 @@ export const getPayoutsMultiOutcome = (
 | 
				
			||||||
    const prob = resolutions[outcome] / probTotal
 | 
					    const prob = resolutions[outcome] / probTotal
 | 
				
			||||||
    const winnings = (shares / sharesByOutcome[outcome]) * prob * poolTotal
 | 
					    const winnings = (shares / sharesByOutcome[outcome]) * prob * poolTotal
 | 
				
			||||||
    const profit = winnings - amount
 | 
					    const profit = winnings - amount
 | 
				
			||||||
 | 
					    const payout = deductFees(amount, winnings)
 | 
				
			||||||
    const payout = amount + (1 - FEES) * Math.max(0, profit)
 | 
					 | 
				
			||||||
    return { userId, profit, payout }
 | 
					    return { userId, profit, payout }
 | 
				
			||||||
  })
 | 
					  })
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user