# FreezeSettlementModule.sol

{% hint style="info" %}
learn more about FreezeSettlementModule.sol [here](https://github.com/turtleshell-xyz/circuitbreaker/blob/main/src/settlement/FreezeAssetModule.sol)
{% endhint %}

The `FreezeSettlementModule` is a specialized Settlement Module within the TurtleShell SDK. Written in Solidity, its primary function is to respond to transactions that trigger predefined security parameters. When such a transaction is detected, the contract acts to freeze the funds involved, thereby preventing potential unauthorized or malicious transfers.

### **Core Functionality**

The main objective of the `FreezeSettlementModule` is to safeguard protocol assets. By freezing funds associated with a suspicious transaction, it provides an immediate protective measure, ensuring that assets remain secure until a further assessment is made.

### **Contract Methods**

#### **function prevent() external payable;**

This function is the heart of the `FreezeSettlementModule`. When called upon, it identifies the funds associated with the transaction that caused the Firewall to trigger and subsequently freezes them, preventing any further movement.

```solidity
contract FreezeSettlementModule {
    function prevent() external {
        /** SDK logic to freeze the affected funds **/
    }
}
```

### **Post-Freeze Governance Action**

Once the funds are frozen, the protocol's governance mechanism can step in to evaluate the situation. Governance has the authority to:

1. **Authorize the Original Transaction:** If, upon review, the transaction is deemed legitimate, governance can allow it to proceed, releasing the frozen funds.
2. **Revert the Funds:** In cases where the transaction is identified as malicious or part of a hacking attempt, governance can decide to transfer the frozen funds back to the protocol, ensuring asset safety.

\\
