Closed mabrehan closed 1 year ago
Need to update assets.owned for liquidate instruction. It was previously updated in close position instruction when a trader makes a loss. This negative PnL is profit for the pool, so it needs to be added to assets.owned
https://github.com/solana-labs/perpetuals/blob/34f9bbb34054b17ca3fab965e5287f0328f9e4c3/programs/perpetuals/src/instructions/liquidate.rs#L200
updated here https://github.com/solana-labs/perpetuals/pull/5/files
Need to update assets.owned for liquidate instruction. It was previously updated in close position instruction when a trader makes a loss. This negative PnL is profit for the pool, so it needs to be added to assets.owned
https://github.com/solana-labs/perpetuals/blob/34f9bbb34054b17ca3fab965e5287f0328f9e4c3/programs/perpetuals/src/instructions/liquidate.rs#L200