# Denial of Service (DoS - Denegación de Servicio)

Un ataque de denegación de servicio ocurre cuando una función de un contrato se bloquea debido a que un actor malintencionado hace que se consuma todo el gas o explota una vulnerabilidad lógica para impedir la ejecución de la función.

**Ejemplo**: Un atacante podría aprovechar una lista de beneficiarios y enviar transacciones maliciosas para impedir que otros beneficiarios reciban sus pagos.

**Mitigación**:

* Evitar bucles sin límites.
* Limitar la cantidad de gas disponible para las transacciones.
* Diseñar smart contracts de manera que no dependan de la ejecución secuencial de tareas críticas.


---

# 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://edp.ethkipu.org/modulo-5/seguridad-pruebas-y-auditoria/seguridad/principales-vulnerabilidades-en-smart-contracts/denial-of-service-dos-denegacion-de-servicio.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.
