# Withdraw

{% hint style="warning" %}
**This documentation is a work in progress!**
{% endhint %}

{% hint style="info" %}
Withdrawing collateral will decrease your [health factor](https://kresko.gitbook.io/kresko-docs/fundamentals/glossary).
{% endhint %}

At some point you might want the deposited collateral back to your wallet. This is done by performing a withdraw from the protocol.

On withdrawals, the protocol performs checks on the user debt. This prevents withdrawals that would cause the [CDP](https://kresko.gitbook.io/kresko-docs/fundamentals/cdps)'s collateral ratio to get under the [MCR](https://kresko.gitbook.io/kresko-docs/fundamentals/cdps/..#minimum-collateralization-ratio). If the checks pass, protocol reduces the recorded collateral deposit amount for the user and transfer the amount of tokens requested to the user.

{% hint style="info" %}
Each withdrawal will emit an event with relevant information.

```solidity
/**
* @notice Emitted when an account withdraws collateral.
* @param account The address of the account withdrawing collateral.
* @param collateralAsset The address of the collateral asset.
* @param amount The amount of the collateral asset that was withdrawn.
*/
event CollateralWithdrawn(address indexed account, address indexed collateralAsset, uint256 indexed amount);
```

{% endhint %}

## Conditions Preventing Withdrawals

### Insufficient Collateral

If an account has existing debt, there is a [minimum collateral value](https://kresko.gitbook.io/kresko-docs/fundamentals/cdps/..#minimum-collateralization-ratio) required to back it up.&#x20;

If accounts collateral value is *smaller* than the minimum collateral value, the withdrawal is not permitted.

### Safety State: Pause

In an emergency situation the [Safety Council](https://kresko.gitbook.io/kresko-docs/fundamentals/glossary) multisig can pause the withdrawals of a Collateral Asset to prevent possible negative impact it would have.&#x20;

### Kresko Asset Minimum Collateral Amount

For [Kresko Asset](https://kresko.gitbook.io/kresko-docs/kresko-assets#overview) [collaterals](https://kresko.gitbook.io/kresko-docs/collateral-assets#overview) the minimum amount of collateral is 1e12 or 0.000001. So if you withdrawal ends up leaving dust lower than this amount, the transaction will revert.
