diff options
| author | historia <[not public]> | 2026-10-05 17:05:14 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-10-05 17:05:14 -0400 |
| commit | e42952469dadfb3535633c66c881050ac128703c (patch) | |
| tree | a78f7396b72cdbd6fa4f6c454c830f40cf2ad0cb /internal/prediction | |
| parent | 90ad8c0c33b519d5830c69d4128bdc984b5e9de8 (diff) | |
| download | thehouseoficarus-e42952469dadfb3535633c66c881050ac128703c.tar.gz | |
fix: gather verbs, walk oom, admin path bypass, roulette refund
Diffstat (limited to 'internal/prediction')
| -rw-r--r-- | internal/prediction/market.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/internal/prediction/market.go b/internal/prediction/market.go index af74ff9..8fbe8a6 100644 --- a/internal/prediction/market.go +++ b/internal/prediction/market.go @@ -138,8 +138,9 @@ func (m Market) Settlement(token string) (float64, bool) { return p, err == nil } -// House quotes are whole credits PER SHARE, not fractional prices rounded only -// after multiplication. A 42.1-credit quote costs 43 and sells for 42 per share. +// BuyPrice returns the house buy quote. House quotes are whole credits PER +// SHARE, not fractional prices rounded only after multiplication. A +// 42.1-credit quote costs 43 and sells for 42 per share. func BuyPrice(p float64) int { return int(math.Ceil(math.Nextafter(p*FaceValue, 0))) } func SellPrice(p float64) int { return int(math.Floor(math.Nextafter(p*FaceValue, math.Inf(1)))) } func BuyCost(p float64, q int) int { return BuyPrice(p) * q } |
