> For the complete documentation index, see [llms.txt](https://help.defisaver.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.defisaver.com/features/automation/how-does-automation-work.md).

# How does Automation work?

By enabling any of our automated strategies, a user gives the DeFi Saver Automation smart contracts the rights to make adjustments on their position - but only once the user configured trigger condition is met, and fully limited by the user's configuration.

> For example, if we take Automated leverage management, an auto-repay can only be executed for a user's position once their current ratio drops below their configured ("repay if below") ratio.
>
> \
> If the system were to attempt to execute a repay before this trigger condition is met, the transaction would fail.

On top of this, there's also on-chain verification of transaction outcomes, meaning that the transaction execution will successfully complete only if the user's target condition is met. In the case of an auto-repay, this means that the "repay to" ratio needs to be reached at the end of the transaction.

Once any automated strategy is enabled for a certain position, the Automation bots start actively monitoring it, so they can execute any needed adjustments as soon as the configured thresholds are reached.

*Below, you'll find an illustration of how an auto-repay works:*

<figure><img src="/files/SQZbWXipukWMLqrZvqIN" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
*This illustration specifically applies to an older automation architecture, though it still provides a good conceptual overview.*
{% endhint %}

*For latest technical details, you can always check the* [*development docs*](https://docs.defisaver.com/)*, as well as the* [*smart contracts source code*](https://github.com/defisaver)*.*

***

## Related Articles:

* [Automation](https://help.defisaver.com/features/automation)
* [Use-case](https://help.defisaver.com/features/automation/use-case)
* [Compatibility](https://help.defisaver.com/features/automation/compatibility)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://help.defisaver.com/features/automation/how-does-automation-work.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
