# ReflexerWithdraw

### Description

Withdraws collateral from a Reflexer safe

> **Notes**
>
> Withdraws collateral from the safe Returns all the collateral of the safe, formatted in the correct decimal Gets Safe info (collateral, debt)

### Action ID

`0x84c3e0aa`

### SDK Action

```ts
const reflexerWithdrawAction = new dfs.actions.reflexer.ReflexerWithdrawAction(
    safeId,
    amount,
    adapterAddr,
    to
);
```

### Action Type

`STANDARD_ACTION`

### Input Parameters

```solidity
    /// @param safeId Id of the safe
    /// @param amount Amount of collateral to withdraw
    /// @param adapterAddr Adapter address of the reflexer collateral
    /// @param to Address where to send the collateral we withdrew
    struct Params {
        uint256 safeId;
        uint256 amount;
        address adapterAddr;
        address to;
    }
```

### Return Value

```solidity
return bytes32(withdrawnAmount);
```

### Events and Logs

```solidity
emit ActionEvent("ReflexerWithdraw", logData);
logger.logActionDirectEvent("ReflexerWithdraw", logData);
bytes memory logData = abi.encode(params);
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.defisaver.com/actions/reflexer/reflexerwithdraw.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
