# Staking Contract Audit

We have had our staking contract audited by Cyberscope (a leading smart contract auditor)\
\
It passed audit :tada:\
\
The full audit is here

{% file src="/files/zgADl9Pamz0TSqacto13" %}

There were 2 medium issues raised, all of which we are happy to accept as this is by design.<br>

1. **Inconsistent Epoch Identification** - the contract allows tokens to be staked even though the epoch has not yet started, meaning that tokens can be staked before an epoch has started.\
   This is seen as a medium risk because staking should be consistent, however, we have designed the contract this way to allow users to stake for Epoch 1 in advance.<br>
2. **Inconsistent pre-epoch unstake** - the contract allows users to unstake only once before epoch 1 begins. All other epochs allow multiple unstakes. This is by design as the 1 week pre-epoch 1 period is for epoch 1 staking. Users will unlikely wnt to unstake more than once during this period. Once epoch 1 is started users can unstake as much as they want.


---

# 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.eagleailabs.com/trade-rewards/staking-contract-audit.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.
