# Proxy contract

### **Purpose**

* The DSProxy contract allows users to execute code on their behalf using a persistent proxy address.
* It simplifies complex multi-step operations by enabling atomic execution within the context of the proxy’s identity.
* Ownership of the proxy is flexible and can be transferred, supporting dynamic models like multisignature wallets.

### Key Methods

* `execute(bytes memory _code, bytes memory _data)`
  * If \_code corresponds to a cached contract, it is executed directly; otherwise, the contract is deployed and cached before execution.
  * \_data specifies the calldata to be sent to the contract.
  * Emits an Execute event upon successful execution.
* `execute(address _target, bytes memory _data)`
  * Directly executes a specified contract (\_target) with provided calldata (\_data).
  * Requires the caller to have the necessary auth permissions.


---

# 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.usdd.io/developers/core-contracts/proxy-contract.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.
