# Links to individual Contracts

The best place to start is with the contract migration functions in this repo:&#x20;

{% embed url="<https://github.dev/Sacred-Finance/sacred-deploy>" %}

The repo has links to the major repos that govern Sacred v1. The major repos are listed below:

### Governance&#x20;

{% embed url="<https://github.dev/Sacred-Finance/sacred-governance>" %}

The contracts hold governance functions such as delegation and voting. However, Sacred voting in the future may come from external DAOs.

### Merkle Trees&#x20;

{% embed url="<https://github.dev/Sacred-Finance/sacred-trees>" %}

Merkle trees for Sacred are handled here.

\
SacredTrees.sol queues and adds deposit/ withdrawal data to Sacred’s Merkle Tree. This is for all deposit and withdrawal events.

### Sacred Token&#x20;

{% embed url="<https://github.dev/Sacred-Finance/sacred-token>" %}

SACRED.sol is the contract that handles the ERC20 token and functions relating to it.

### Incognito (Anonymity) Mining

[https://github.dev/Sacred-Finance/sacred-anonymity-mini](https://github.dev/Sacred-Finance/sacred-anonymity-mining)[ng](https://github.dev/Sacred-Finance/sacred-anonymity-mining)

1. SacredProxy.sol&#x20;

   This is Sacred’s key feature and holds the Anonymity Mining contracts: This handles deposits and withdrawals, making sure they are recorded in Merkle Trees. On depositing or withdrawing, the total shares each user has is updated.&#x20;
2. Miner.sol&#x20;

   This contract handles the actual mining and communicates with the pool that is below Sacred. It is called by SacredProxy each time there is a deposit/ withdrawal and updates the shares.&#x20;
3. RewardSwap&#x20;

   After users have withdrawn their deposit, they also get Incognito Credits they can redeem for actual SACRED. This contract handles the swapping mechanism and price, based on amount of Sacred tokens in the contract.&#x20;
4. AaveInterestsProxy.sol&#x20;

   This contract connects to Aave and allows for withdrawal of the interest gained in the underlying pool. This is a separate transaction from withdrawing Incognito Credits.[<br>](https://github.dev/Sacred-Finance/sacred-anonymity-mining)
