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
  1. What is Sacred?
  2. User journey - from Deposit to Withdrawal
  3. 5. Redeem Claim - Receive Principal

Sacred Automated Market Maker

Previous5. Redeem Claim - Receive PrincipalNext6. Redeem Yield

Last updated 2 years ago

SACRED is dripped continuously into the AMM. Like an auction house, there is only a limited amount of SACRED swapped (or auctioned) per day. It means the cost to swap (bid) IC for SACRED varies. Thus, users must be strategic on when to swap, especially on days with high demand for the token.

The formula governing the drip into the AMM is shown below:

Where: Svirt is the amount of SACRED available in the contract available to redeem, which determines the conversion rate. In reality, the redemption contract holds all the SACRED that will be available to withdraw in the lifetime of the contract. However, Svirt displays the ‘balance’ that is currently available for redemption. To the external user, this looks like SACRED is being dripped into the contract.

S is the total SACRED available to redeem for the lifetime of the contract

Swithdrawn is the total amount of SACRED that has been withdrawn from the contract.

The formula that prices the IC to SACRED follows:

Where:

SACRED is the amount the user will receive for their IC

IC is the amount of Incognito Credits they deposit into the contract

W is a weight constant defined by the DAO

Svirt is as described above