# Stacks Raw Transactions

Use the raw transaction format to create arbitrary Stacks transactions. For simple transfers, consider using the dedicated higher-level format. See [Stacks Transfers](/developers/transaction-types/stacks-transfers).

Fordefi can handle any Stacks transaction. While raw Stacks transactions can be used to create transfers, it is recommended to use their requests’ formats.

To invoke a call to a smart contract using the Fordefi platform, you should pass in the `serialized_transaction` to create in hex-encoded format.

Here’s an example:


```jsx
{
  "vault_id": "432b199b-1f71-42bf-ba0b-33d512afa9de",
  "note": "string",
  "signer_type": "initiator",
  "sign_mode": "auto",
  "type": "stacks_transaction",
  "details": {
    "type": "stacks_serialized_transaction",
    "fail_on_prediction_failure": true,
    "push_mode": "auto",
    "serialized_transaction": "0x808000000004004ac4247d93e467e674008164caed59747e9a97d7000000000000000a00000000000001c800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003020000000201021add74232012fbd68345fef439f1243b314b85866d1add74232012fbd68345fef439f1243b314b85866d0b6d795f636f6e74726163740243430100000000000003e800021add74232012fbd68345fef439f1243b314b85866d0100000000000007d0021a6d78de7b0625dfbfc16c3a8a5735f6dc3dc3f2ce0d746573742d636f6e74726163740d746573742d66756e6374696f6e000000030000000000000000000000000000000001030d0000000474657374",
    "chain": "stacks_mainnet",
    "skip_prediction": false
  }
}
```

## Stacks post conditions

Post conditions in the Stacks blockchain ensure that a transaction executes only if specific asset conditions are met. Users can attach post conditions to define expected changes to their STX tokens, fungible tokens (FTs), and non-fungible tokens (NFTs). If a transaction violates any post condition, it is automatically reverted, preventing unintended asset transfers.

Each transaction can include zero or more post conditions, each specifying:

- **Principal**: The sender of the asset (a standard or contract address)
- **Asset Name**: The specific asset being tracked
- **Comparator**: The condition applied to the asset change
- **Literal**: The integer or boolean value used for comparison


#### Comparator Types

- **Fungible Assets**: Checks whether the amount of a fungible token increased, decreased, or remained the same
- **Non-Fungible Assets**: Checks whether an NFT was transferred


#### Post Condition Modes

- **Allow Mode**: Permits additional asset transfers beyond those specified
- **Deny Mode**: Blocks all asset transfers except those explicitly stated


Using the Stacks' ALLOW mode is risky, as it may permit unintended asset transfers. To mitigate this, Fordefi includes a risk notification when users create Stacks transactions with ALLOW mode enabled.

The risk is reported in the Fordefi Chrome extension, so;

alt
br
Learn more: [Understand Alerts and Warnings](/user-guide/work-with-dapps/understand-alerts-and-warnings)