interface PositionOwner {

    // ============ Public Interface functions ============

    /**
     * Function a contract must implement in order to receive ownership of a position via the
     * transferPosition function or the atomic-assign to the "owner" field when opening a position.
     *
     * @param  from        Address of the previous owner
     * @param  positionId  Unique ID of the position
     * @return             This address to keep ownership, a different address to pass-on ownership
     */
    function receivePositionOwnership(
        address from,
        bytes32 positionId
    )
        external
        /* onlyMargin */
        returns (address);
}
/**
 * @title PositionOwner
 * @author dYdX
 *
 * Interface that smart contracts must implement in order to own position on behalf of other
 * accounts
 *
 * NOTE: Any contract implementing this interface should also use OnlyMargin to control access
 *       to these functions
 */
function receivePositionOwnership(
    address from,
    bytes32 positionId
)
    external
    /* onlyMargin */
    returns (address);

/**
 * Function a contract must implement in order to receive ownership of a position via the
 * transferPosition function or the atomic-assign to the "owner" field when opening a position.
 *
 * @param  from        Address of the previous owner
 * @param  positionId  Unique ID of the position
 * @return             This address to keep ownership, a different address to pass-on ownership
 */