library ExplicitERC20 {
    using SafeMath for uint256;

    /**
     * When given allowance, transfers a token from the "_from" to the "_to" of quantity "_quantity".
     * Ensures that the recipient has received the correct quantity (ie no fees taken on transfer)
     *
     * @param _token           ERC20 token to approve
     * @param _from            The account to transfer tokens from
     * @param _to              The account to transfer tokens to
     * @param _quantity        The quantity to transfer
     */
    function transferFrom(
        IERC20 _token,
        address _from,
        address _to,
        uint256 _quantity
    )
        internal
    {
        // Call specified ERC20 contract to transfer tokens (via proxy).
        if (_quantity > 0) {
            uint256 existingBalance = _token.balanceOf(_to);

            SafeERC20.safeTransferFrom(
                _token,
                _from,
                _to,
                _quantity
            );

            uint256 newBalance = _token.balanceOf(_to);

            // Verify transfer quantity is reflected in balance
            require(
                newBalance == existingBalance.add(_quantity),
                "Invalid post transfer balance"
            );
        }
    }
}
/**
 * @title ExplicitERC20
 * @author Set Protocol
 *
 * Utility functions for ERC20 transfers that require the explicit amount to be transferred.
 */
function transferFrom(
    IERC20 _token,
    address _from,
    address _to,
    uint256 _quantity
)
    internal
{
    // Call specified ERC20 contract to transfer tokens (via proxy).
    if (_quantity > 0) {
        uint256 existingBalance = _token.balanceOf(_to);

        SafeERC20.safeTransferFrom(
            _token,
            _from,
            _to,
            _quantity
        );

        uint256 newBalance = _token.balanceOf(_to);

        // Verify transfer quantity is reflected in balance
        require(
            newBalance == existingBalance.add(_quantity),
            "Invalid post transfer balance"
        );
    }
}

/**
 * When given allowance, transfers a token from the "_from" to the "_to" of quantity "_quantity".
 * Ensures that the recipient has received the correct quantity (ie no fees taken on transfer)
 *
 * @param _token           ERC20 token to approve
 * @param _from            The account to transfer tokens from
 * @param _to              The account to transfer tokens to
 * @param _quantity        The quantity to transfer
 */