SACRED Technical Private Doc
  • What is Sacred?
    • Introduction to Sacred
    • Repos and Video Walkthrough
    • How to Use Sacred
    • Sacred Pools (Boxes)
    • Anonymity Set
    • User journey - from Deposit to Withdrawal
      • 1. Receive Note
      • 2. Deposit Tokens
      • 3. Earn While Waiting
        • Shares-of-Staked Seconds
        • Interest earning interest
        • Share Tracking Quirks
      • 4. Withdraw
      • 5. Redeem Claim - Receive Principal
        • Sacred Automated Market Maker
      • 6. Redeem Yield
      • 7. Redeem Incognito Credits
      • Using a Relayer to withdraw the principal, IC and yield
    • Sacred Rules to keep your deposit private
    • Circuits Summary
    • Links to individual Contracts
Powered by GitBook
On this page
  • Governance
  • Merkle Trees
  • Sacred Token
  • Incognito (Anonymity) Mining
  1. What is Sacred?

Links to individual Contracts

PreviousCircuits Summary

Last updated 2 years ago

The best place to start is with the contract migration functions in this repo:

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

Governance

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

Merkle 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

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

Incognito (Anonymity) Mining

  1. SacredProxy.sol

    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.

  2. Miner.sol

    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.

  3. RewardSwap

    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.

  4. AaveInterestsProxy.sol

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.

https://github.dev/Sacred-Finance/sacred-anonymity-mini
ng
LogoGitHub web editor
LogoGitHub web editor
LogoGitHub web editor
LogoGitHub web editor