sID - Derivative recipe

Currently, the derivative interface is under heavy development thus you may expect to see these interfaces changed later.

pragma solidity ^0.5.4;
pragma experimental ABIEncoderV2;
import "../Lib/LibDerivative.sol";
contract IDerivativeLogic is LibDerivative {
// Validates input data and returns whether derivative could be created
function validateInput(Derivative memory _derivative) public view returns (bool);
// Returns margin needed for the derivative creation
function getMargin(Derivative memory _derivative) public view returns (uint256 buyerMargin, uint256 sellerMargin);
// Returns payouts for derivative's execution
function getExecutionPayout(Derivative memory _derivative, uint256 _result) public view returns (uint256 buyerPayout, uint256 sellerPayout);
// Returns meta data in JSON string
function getMetaData() public view returns (string memory metaData);
// Returns whether thirdparty could execute on derivative's owner's behalf
function thirdpartyExecutionAllowed(address derivativeOwner) public view returns (bool);
// Returns whether synthetic implements pool logic
function isPool() public view returns (bool);
// Sets whether thirds parties are allowed or not to execute derivative's on msg.sender's behalf
function allowThirdpartyExecution(bool allow) public;