How did jerry get $11 and Elaine $9?
Those numbers seems to be based on the underlying value of what the contract represents:
Elaine: Ive put up an order to sell 1 Seinfeld contract for $10
Jerry: Now Ive got [...] 1 Seinfled
Elaine: Ive got -1 Seinfeld, what does that even mean?
Jerry: It means Elaine, you need what I have
Elaine: Hah! But you also need someone to buy that 1 Seinfeld off you if want your money freed up again
Elaine: It says the contract is valued at $100 worth of Seinfeld
Jerry: Ill put my order at $10.1
Elaine: Ill buy it back at $10.1
Jerry: Now we both have 0 Seinfeld, I have $11 and you have $9
Whats happening here [...] The protocol parses the index# of the contract that is being netted to 0 and compares the price of that transaction to the price of the contract that nets out the first contract. In this case, both parties in a transaction are netting positions. The price difference between netted contract is a positive number, so a settlement will be paid to the address that is reducing a positive balance by 1.