-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathIMarketUtility.sol
More file actions
83 lines (69 loc) · 2.96 KB
/
IMarketUtility.sol
File metadata and controls
83 lines (69 loc) · 2.96 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
pragma solidity 0.5.7;
contract IMarketUtility {
function initialize(address payable[] calldata _addressParams, address _initiater) external;
/**
* @dev to Set authorized address to update parameters
*/
function setAuthorizedAddres() public;
/**
* @dev to update uint parameters in Market Config
*/
function updateUintParameters(bytes8 code, uint256 value) external;
/**
* @dev to Update address parameters in Market Config
*/
function updateAddressParameters(bytes8 code, address payable value) external;
/**
* @dev Get Parameters required to initiate market
* @return Addresses of tokens to be distributed as incentives
* @return Cool down time for market
* @return Rate
* @return Commission percent for predictions with ETH
* @return Commission percent for predictions with PLOT
**/
function getMarketInitialParams() public view returns(address[] memory, uint , uint, uint, uint);
function getAssetPriceUSD(address _currencyAddress) external view returns(uint latestAnswer);
function getPriceFeedDecimals(address _priceFeed) public view returns(uint8);
function getValueAndMultiplierParameters(address _asset, uint256 _amount)
public
view
returns (uint256, uint256);
function update() external;
function calculatePredictionValue(uint[] memory params, address asset, address user, address marketFeedAddress, bool _checkMultiplier) public view returns(uint _predictionValue, bool _multiplierApplied);
/**
* @dev Get basic market details
* @return Minimum amount required to predict in market
* @return Percentage of users leveraged amount to deduct when placed in wrong prediction
* @return Decimal points for prediction positions
**/
function getBasicMarketDetails()
public
view
returns (
uint256,
uint256,
uint256,
uint256
);
function getDisputeResolutionParams() public view returns (uint256);
function calculateOptionPrice(uint[] memory params, address marketFeedAddress) public view returns(uint _optionPrice);
/**
* @dev Get price of provided feed address
* @param _currencyFeedAddress Feed Address of currency on which market options are based on
* @return Current price of the market currency
**/
function getSettlemetPrice(
address _currencyFeedAddress,
uint256 _settleTime
) public view returns (uint256 latestAnswer, uint256 roundId);
/**
* @dev Get value of provided currency address in ETH
* @param _currencyAddress Address of currency
* @param _amount Amount of provided currency
* @return Value of provided amount in ETH
**/
function getAssetValueETH(address _currencyAddress, uint256 _amount)
public
view
returns (uint256 tokenEthValue);
}