Scorum
libraries
chain
include
scorum
chain
betting
betting_math.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <
scorum/protocol/odds.hpp
>
4
#include <
scorum/protocol/asset.hpp
>
5
6
namespace
scorum
{
7
namespace
chain {
8
9
using
scorum::protocol::asset
;
10
using
scorum::protocol::odds
;
11
12
asset
calculate_gain
(
const
asset& bet_stake,
const
odds& odds);
13
14
struct
matched_stake_type
15
{
16
asset
bet1_matched
=
asset
(0,
SCORUM_SYMBOL
);
17
asset
bet2_matched
=
asset
(0,
SCORUM_SYMBOL
);
18
};
19
20
matched_stake_type
21
calculate_matched_stake
(
const
asset
& bet1_stake,
const
asset
& bet2_stake,
const
odds
& bet1_odds,
const
odds
& bet2_odds);
22
}
23
}
scorum::protocol::odds
Definition:
odds.hpp:14
SCORUM_SYMBOL
#define SCORUM_SYMBOL
Definition:
config.hpp:102
scorum::chain::calculate_gain
asset calculate_gain(const asset &bet_stake, const odds &odds)
Definition:
betting_math.cpp:8
scorum::chain::calculate_matched_stake
matched_stake_type calculate_matched_stake(const asset &bet1_stake, const asset &bet2_stake, const odds &bet1_odds, const odds &bet2_odds)
Definition:
betting_math.cpp:18
scorum
Definition:
asset.cpp:15
odds.hpp
asset.hpp
scorum::chain::matched_stake_type
Definition:
betting_math.hpp:15
scorum::chain::matched_stake_type::bet2_matched
asset bet2_matched
Definition:
betting_math.hpp:17
scorum::chain::matched_stake_type::bet1_matched
asset bet1_matched
Definition:
betting_math.hpp:16
scorum::protocol::asset
Definition:
asset.hpp:16
Generated on Thu Jun 9 2022 13:04:24 for Scorum by
1.9.1