unlock_slot is the per-note time-lock that enforces SolMask's privacy delay. When you deposit, the UI converts your chosen delay (1 hour, 6 hours, 1 day, up to a week) into a Solana slot number — roughly current_slot + delay_seconds / 0.4 — and binds that value into the commitment alongside the secret and the amount.
At withdraw time, the Groth16 circuit checks that unlock_slot <= current_slot and the on-chain verifier checks that the slot it was given against Clock::get()?.slot actually matches. A proof generated before the unlock slot is mathematically valid but the program will reject the transaction.
The delay exists because instant withdrawals are trivially linkable: if a deposit and a same-amount withdraw land in adjacent slots, an observer's first guess about who sent what is going to be right. Forcing every note to wait a chosen duration lets new deposits accumulate alongside yours, growing the anonymity set before your withdraw lands.