Lock Contracts

Asset locking is a useful feature in blockchain systems. Our lock contract is a tool to lock funds for user-defined period of time before they can be retrieved.

Implementation

Similar to the deposit and withdraw contract, we need to record extra features for this new contract. The only extra thing we need to record is a numerical timestamp for each address. In the lock contract, there is a 'lock' function, which can be called directly and records/updates a lock time for each address.

Where to use it?

The lock contract provides the 'lock' function, which allows users to lock assets until some future time by setting an unlock


Example

Alice deposits her VSYS coin or tokens to a lock contract on the chain. Using the "lock" function, she submits an unlock timestamp. Once this timestamp is set, she can only withdraw her VSYS coin or tokens after the unlock timestamp. Before the unlock timestamp, only the deposit trigger can be called from the token contract. Before the unlock timestamp, the lock contract only accepts deposits. The lock contract can be used as a proof of digital property.

Lock Contracts artwork

What Makes V Systems Lock Contract Special?

This idea is like a pool procedure, one can increase the pool size and extend the lock time at anytime. It can also be reused again if you like.

Developer Resources CTA Image

Developers Resources

Join Us to the Blockchain Era
This Website Uses Cookies

Hi, this website uses essential cookies to ensure its proper operation and tracking cookies to understand how you interact with it. The latter will be set only upon approval. Read More

Learn

Products

DeFi

Developers

Enterprise and Institutional

VSYS Community

Join Us

News

Footer VSYS Logo Colored
Privacy Policy | Terms of Use © 2022 V Systems All Rights Reserved.
Footer Artwork