interface ForceRecoverCollateralDelegator {

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

    /**
     * Function a contract must implement in order to let other addresses call
     * forceRecoverCollateral().
     *
     * NOTE: If not returning zero address (or not reverting), this contract must assume that Margin
     * will either revert the entire transaction or that the collateral was forcibly recovered.
     *
     * @param  recoverer   Address of the caller of the forceRecoverCollateral() function
     * @param  positionId  Unique ID of the position
     * @param  recipient   Address to send the recovered tokens to
     * @return             This address to accept, a different address to ask that contract
     */
    function forceRecoverCollateralOnBehalfOf(
        address recoverer,
        bytes32 positionId,
        address recipient
    )
        external
        /* onlyMargin */
        returns (address);
}
/**
 * @title ForceRecoverCollateralDelegator
 * @author dYdX
 *
 * Interface that smart contracts must implement in order to let other addresses
 * forceRecoverCollateral() a loan owned by the smart contract.
 *
 * NOTE: Any contract implementing this interface should also use OnlyMargin to control access
 *       to these functions
 */
function forceRecoverCollateralOnBehalfOf(
    address recoverer,
    bytes32 positionId,
    address recipient
)
    external
    /* onlyMargin */
    returns (address);

/**
 * Function a contract must implement in order to let other addresses call
 * forceRecoverCollateral().
 *
 * NOTE: If not returning zero address (or not reverting), this contract must assume that Margin
 * will either revert the entire transaction or that the collateral was forcibly recovered.
 *
 * @param  recoverer   Address of the caller of the forceRecoverCollateral() function
 * @param  positionId  Unique ID of the position
 * @param  recipient   Address to send the recovered tokens to
 * @return             This address to accept, a different address to ask that contract
 */