INineLivesTrading
Functions
ctor
ctor to set the values for this contract.
function ctor(CtorArgs calldata ctorArgs) external;
Parameters
Name | Type | Description |
---|---|---|
ctorArgs | CtorArgs | to use during creation of the setup. |
oracle
oracle that's in use in this trading contract.
function oracle() external view returns (address);
mint8A059B6E
Mint some shares in exchange for fUSDC. Optionally branches to permit or a classic approval based on the deadline argument (if set to 0, assumes approval)
function mint8A059B6E(bytes8 outcome, uint256 value, address referrer, address recipient) external returns (uint256);
burn854CC96E
Burn some shares by inverting the AMM function using the fUSDC amount, or the shares, depending on the shouldEstimateShares argument. Returns the burned shares, and the fusdc returned.
function burn854CC96E(
bytes8 outcome,
uint256 amount,
bool shouldEstimateShares,
uint256 minShares,
address referrer,
address recipient
) external returns (uint256 burnedShares, uint256 fusdcReturned);
quoteC0E17FC7
Quote function for testing the amount that could be minted.
function quoteC0E17FC7(bytes8 outcome, uint256 fusdcValue) external returns (uint256 purchased, uint256 fees);
Parameters
Name | Type | Description |
---|---|---|
outcome | bytes8 | to test for |
fusdcValue | uint256 | to test spending for |
estimateBurnE9B09A17
function estimateBurnE9B09A17(bytes8 outcome, uint256 shareAmount) external returns (uint256);
rescue276DD9AB
function rescue276DD9AB(address recipient) external returns (uint256);
claimLiquidity9C391F85
function claimLiquidity9C391F85(address recipient) external;
claimLpFees66980F36
function claimLpFees66980F36(address recipient) external;
addLiquidityA975D995
function addLiquidityA975D995(uint256 liquidity, address recipient) external returns (uint256 userLiquidity);
removeLiquidity3C857A15
function removeLiquidity3C857A15(uint256 liquidity, address recipient)
external
returns (uint256 fusdcAmount, uint256 lpFeesEarned);
claimAddressFeesB302CF6D
Claim fees owed to a specific address, perhaps after they've been doing referrals.
function claimAddressFeesB302CF6D(address recipient) external returns (uint256);
Parameters
Name | Type | Description |
---|---|---|
recipient | address | to send the rewards to. |
priceA827ED27
Get the price of an outcome in fUSDC.
function priceA827ED27(bytes8 outcome) external returns (uint256);
Parameters
Name | Type | Description |
---|---|---|
outcome | bytes8 | to test for |
shutdown
Shutdown this contract by disabling associated pools. Compensates callers of this function by distributing them a small amount of token for doing so. This can only be called when the contract has exceeded its deadline.
function shutdown() external returns (uint256);
decide
Decide an outcome. Only callable by the oracle!
function decide(bytes8 outcome) external;
Parameters
Name | Type | Description |
---|---|---|
outcome | bytes8 | to set as the winner. |
payoffCB6F2565
Collect the payoff if holding winning shares!
function payoffCB6F2565(bytes8 outcomeId, uint256 amount, address recipient) external returns (uint256);
Parameters
Name | Type | Description |
---|---|---|
outcomeId | bytes8 | to collect the payoff for. |
amount | uint256 | of share to use for receiving the payoff. |
recipient | address | to send the winnings to. |
details
Details that're available for this outcome.
function details(bytes8 outcomeId)
external
view
returns (uint256 shares, uint256 invested, uint256 globalInvested, bytes8 winner);
Parameters
Name | Type | Description |
---|---|---|
outcomeId | bytes8 | to get the details for |
escape
function escape() external;
isDpm
is this trading contract running the DPM?
function isDpm() external view returns (bool);
globalShares
global shares minted.
function globalShares() external view returns (uint256);
invested
Invested amount of fusdc in the predicting pool.
function invested() external view returns (uint256);
timeEnding
function timeEnding() external view returns (uint64);
timeStart
function timeStart() external view returns (uint64);
shareAddr
get a share address using the identifier given instead of an online check.
function shareAddr(bytes8 outcomeId) external view returns (address);
version
function version() external pure returns (string memory);
fees62DAA154
fees currently set in the market. Scaled by FEE_SCALING.
function fees62DAA154() external view returns (Fees memory);
userLiquidityShares
function userLiquidityShares(address spender) external view returns (uint256);
Structs
UserLiqAdded
struct UserLiqAdded {
bytes8 outcome;
uint256 sharesReceived;
}
UserLiqRemoved
struct UserLiqRemoved {
bytes8 outcome;
uint256 sharesReceived;
}
Fees
struct Fees {
uint256 feeCreator;
uint256 feeMinter;
uint256 feeLp;
uint256 feeReferrer;
}