Expiry mechanism

⏳ Expiry Mechanism

To ensure long-term efficiency and prevent the protocol from being weighed down by abandoned deposits, GothamCash implements an expiry system for all deposits.

🕒 How it works

  • Every commitment (deposit) has a maximum validity period of 365 days (1 year).

  • If a user does not withdraw their funds within that period, the commitment is considered expired.

  • Expired funds can be reclaimed by the protocol owner to free up storage and maintain a healthy contract state.

  • Don't worry, it only concerns the funds deposited at least 1 year before, not the active deposits (which are safely stored in the smart contract).

♻️ Why is this important?

  • Storage efficiency: Without expiry, the contract would grow indefinitely as old, unused commitments accumulate.

  • Gas optimization: Iterating over a large list of stale commitments increases gas costs for both users and the protocol.

  • Privacy health: Expired, unused notes may distort anonymity metrics. Cleaning them up improves the actual mixing quality.

  • Upgradeability: In case of a new contract replacing the original (a new version for example), the abandoned deposits will be reinjected into the project.

🛡️ What happens to expired funds?

  • Expired funds are not lost immediately.

  • They are reclaimed manually by the owner through a specific function (reclaimExpired() or reclaimExpiredBatch()), ensuring transparency.

  • Events are emitted during the reclaim process so anyone can audit when and which commitments were cleared.

⚠️ User Reminder

It is your responsibility to withdraw your funds within the expiry window. Set a reminder, save your note securely, and don’t wait too long before withdrawing!

To summarize, every deposit has a maximum lifespan of 365 days (1 year) as stated in the contract (hardcoded, cannot be changed). If not withdrawn after 365 days, these funds will be reinjected in the project's economy.

Last updated