Daniel Karzel
3 years ago
No known key found for this signature in database
GPG Key ID: 30C3FC2E438ADB6E
1 changed files with
0 additions and
2 deletions
-
daemon/src/model/cfd.rs
|
@ -547,8 +547,6 @@ impl Cfd { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
pub fn profit(&self, current_price: Usd) -> Result<(SignedAmount, Percent)> { |
|
|
pub fn profit(&self, current_price: Usd) -> Result<(SignedAmount, Percent)> { |
|
|
// TODO: We should use the payout curve here and not just the current price!
|
|
|
|
|
|
|
|
|
|
|
|
let closing_price = match (self.attestation(), self.collaborative_close()) { |
|
|
let closing_price = match (self.attestation(), self.collaborative_close()) { |
|
|
(Some(_attestation), Some(collaborative_close)) => collaborative_close.price, |
|
|
(Some(_attestation), Some(collaborative_close)) => collaborative_close.price, |
|
|
(None, Some(collaborative_close)) => collaborative_close.price, |
|
|
(None, Some(collaborative_close)) => collaborative_close.price, |
|
|