Vesting

Vesting contract is a smart contract that locks up funds for a period of time and allows the owner to withdraw the funds after the lockup period.

When a new employee joins an organization, they typically receive a promise of compensation to be disbursed after a specified duration of employment. This arrangement often involves the organization depositing the funds into a vesting contract, with the employee gaining access to the funds upon the completion of a predetermined lockup period. Such a system is designed to incentivize the employee to remain with the organization for the agreed-upon duration, thereby fostering commitment and stability within the workforce.

Through the utilization of vesting contracts, organizations establish a mechanism to encourage employee retention by linking financial rewards to tenure. By requiring employees to wait until the end of a designated lockup period before accessing their promised funds, the organization promotes loyalty and long-term engagement among its workforce. This approach serves to align the interests of both the employee and the organization, fostering mutual investment in each other's success and contributing to the establishment of a stable and committed workforce.

There are 4 actions (or endpoints) available to interact with this smart contract:

  • deposit asset
  • withdraw asset

Initialize the Marketplace

Utilizing the Marketplace contract requires a blockchain provider and a connected browser wallet. Here is an example how we can initialize the Marketplace.

You can define the fetcher and submitter with one of our blockchain providers or use your own custom provider. We use these fetcher and submitter to query for locked UTxO and submit transactions. The connected wallet are defined in the initiator and signer. The network can defined in network, it has to be one of the following values: "testnet" | "preview" | "preprod" | "mainnet"

The owner is the address of the marketplace owner which will receive the marketplace fee. The percentage is the percentage of the sale price that the marketplace owner will take. Note that, the fee numerator is in the order of millions, for example 3000 implies a fee of 3000/1_000_000 (or 0.003) implies a fee of 0.3%.

Try the demo

You can test this martetplace smart contract on this page.

Firstly, switch your wallet network to one of the testnets, and connect wallet.