XDC Smart Lock allow users to perform escrow services – to hold XDC centrally till all the smart triggering conditions have been fulfilled. In the current version, the triggering condition has been set to a time sensitive unlocking.
XDC Smart Lock application utilizes alarm clock jobs triggerable through either Chainlink or Plugin oracles. Users can specify an amount of XDC to be locked up, a date and time at which the locked XDC will be released, and an address for the released XDC to be sent to.
XDC SmartLock allows users to login with XDCPay chrome extension and configure, deploy, and manage their time locked smart contracts. The intuitive user interface allows users to create a 1:Many escrow without needing to know or understand Solidity (the language that the smart contract(s) are written in).
The XDCPay is an extension for accessing XDC’s XDPoS enabled distributed applications, or “Dapps” in the browser.
The XDCPay extension lets the user create and manage their own identities (via private keys, local client wallet). Users can review and approve the transaction while creating transactions on the block chain.
Once the account is setup in XDCPay –
- Select the appropriate network. XDC Mainnet for main network and XDC Apothem for test network
- Make sure the account has sufficient XDC balance and required tokens (either LINK or PLI tokens)
- Access the application at xdc-smartlock.net and click on Access XDCPay to login to the application
Either LINK or PLI tokens are required to create XDC Smart Locks. These tokens are required to initiate the Alarm Job in either Chainlink or Plugin oracle nodes.
For Apothem (testnet) network, test LINK or PLI tokens can be requested from the Faucet menu option.
NOTE: Faucet option does not work for the main network
Smart Locks menu option can be used to view all the Smart Locks created by the account selected in XDCPay.
Following summary fields will be displayed for all the Smart Lock contracts-
|Contract Address||Address of the XDC Smart Lock|
|XDC||Total amount of XDC locked up|
|Created Date||Contract creation date|
|Unlock Date||XDC release date|
|Node||Node type i.e. either Chainlink or Plugin|
|Receivers||Total number of receivers and corresponding XDC locked up|
|Status||Status of the transaction|
New Smart Lock
Creating XDC Smart Lock is a 2 step process, which includes –
- Creating a new Smart Lock contratct
- Choosing the appropriate oracle node and transfer the tokens required to initiate the Alarm Job
Creating a new Smart Lock
- Select the XDC Lockup duration
- Add multiple receivers address and the corresponding XDC to be sent to each receiver
- On confirmation, the Smart Lock will be created with all the information and the XDC will be locked up in the Smart Lock contract.
Choosing the appropriate oracle node
In this step, either Chainlink or Plugin nodes can be selected to initiate the Alarm job. Either of the nodes can be selected based on the preferences or charges. Once the tokens are transferred, the job will be initiated to transfer the locked up XDC after the specified duration.
Chainlink decentralized oracle networks provide tamper-proof inputs, outputs, and computations to support advanced smart contracts on blockchain. For more information visit chain.link site
Common framework platform on XDC Network nodes to run decentralized web3 APIs 24×7 without any centralized failure, by providing cost effective solutions. For more information visit goplugin.co site
Smart Lock Details
Complete details of the Smart Lock will be displayed in the Smart Lock details, which includes –
- Contract Address
- Total XDC locked up
- Status of the contract
- Current balance of the contract
- Receivers and corresponding funds allocated
- Created Date
- Unlock Date
- Oracle node selected to initiate the Alarm job i.e. either Chainlink or Plugin
Based on the status of the contract, following actions will be available –
|Transfer Token||This option will be available only if the token is not transferred to the contract. Using this option either LINK or PLI token can be transferred to the contract to initiate the Alarm job|
|Withdraw Contract||This option will be available only if the token is not transferred to the contract and when Alarm job is not initiated. Using this option user can withdraw the total allocated XDC back to the wallet|
XDC SmartLock is an application with full integrations for both Chainlink and Go Plugin. Our code is currently deployed to Apothem, the XDC Test network. In a future sprint we will be deploying to the XDC Mainnet, at which point XDC SmartLock will be open to the community for escrow creation. More updates about the application can be found here.