# AnteHandlers

The `x/vesting` module provides `AnteDecorator`s that are recursively chained together into a single [`Antehandler`](https://github.com/cosmos/cosmos-sdk/blob/v0.43.0-alpha1/docs/architecture/adr-010-modular-antehandler.md). These decorators perform basic validity checks on an Ethereum or SDK transaction, such that it could be thrown out of the transaction Mempool.

Note that the `AnteHandler` is called on both `CheckTx` and `DeliverTx`, as Tendermint proposers presently have the ability to include in their proposed block transactions that fail `CheckTx`.

### Decorators <a href="#decorators" id="decorators"></a>

The following decorators implement the vesting logic for token delegation and performing EVM transactions.

#### `VestingDelegationDecorator` <a href="#vestingdelegationdecorator" id="vestingdelegationdecorator"></a>

Validates if a transaction contains a staking delegation of unvested coins. This AnteHandler decorator will fail if:

* the message is not a `MsgDelegate`
* sender account cannot be found
* sender account is not a `ClawbackVestingAccount`
* the bond amount is greater than the coins already vested

#### `EthVestingTransactionDecorator` <a href="#ethvestingtransactiondecorator" id="ethvestingtransactiondecorator"></a>

Validates if a clawback vesting account is permitted to perform Ethereum transactions, based on if it has its vesting schedule has surpassed the vesting cliff and first lockup period. This AnteHandler decorator will fail if:

* the message is not a `MsgEthereumTx`
* sender account cannot be found
* sender account is not a `ClawbackVestingAccount`
* block time is before surpassing vesting cliff end (with zero vested coins) AND
* block time is before surpassing all lockup periods (with non-zero locked coins)


---

# 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.metanovaverse.com/protocol-developers/modules/vesting/antehandlers.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.
