> For the complete documentation index, see [llms.txt](https://lab.guardianaudits.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lab.guardianaudits.com/encyclopedia-of-security-research/interfaces.md).

# Interfaces

Almost every project has interfaces, there are some sneaky issues that can arise from mal-defined interfaces which create issues in production.

## Edge Cases & Exploit Vectors

Whenever an interface does not align with the implementation of the contract being cast as such, this often results in a DoS revert or extreme logical issue.

Most notably, return values are often mis-matching. Whenever an interface expects a return value and none is provided the EVM will revert. Furthermore if a return value of one type is expected, but a different type is received there can be either a DoS or Critical logical error that occurs during decoding the returnData.

## Checklist Items

* Did you check if the interfaces being used for addresses that receive external calls match the actual implementation of that address's implementation of the target function? Function name, parameters, return values.

## Audit References & Resources

MIMSwap: [H-05](https://github.com/GuardianAudits/Audits/blob/main/MIMSwap/2024-03-21_MIMSwap.pdf)

Nunchi SY Token: [H-02](https://github.com/GuardianAudits/Audits/blob/main/Nunchi/2025-11-22_Nunchi_SY_Genesis_Vaults.pdf)


---

# 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://lab.guardianaudits.com/encyclopedia-of-security-research/interfaces.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.
