Hello Stacks community!
Today DLC.Link is happy to announce an upgrade to our Basic DLC management contract. Today’s deployment signifies the final beta release of our three contracts before the production launch. (To learn more about DLCs and DLC.Link, please visit our documentation site at https://docs.dlc.link)
Basic is the most generic version of our DLC management contract, and allows for arbitrary use cases to leverage DLCs. Any complex logic for the contract would be handled within the partner contract, and finally a payout of between 0 and 100 (5 digit precision) would be used to determine the payouts of the DLC.
DLC.Link has three types of contracts, which are used in different use-cases. In addition to the Basic contract, below is a description of the two other contracts, Priced and Loan. All contracts have an associated example usage contract showcasing a way to interface with the contract. They are each listed, along with a link to each contract.
For more information on each contract, please reference the associated README in Github, or view the contract on the explorer.
This is the most generic version of our DLC management contract, and allows for arbitrary use-cases to leverage DLCs. Any complex logic for the contract would be handled within the partner contract, and finally a payout of between 0 and 100 (5 digit precision) would be used to determine the payouts of the DLC.
Contract source: https://github.com/DLC-link/dlc-clarity-smart-contract/blob/master/contracts/dlc-manager.clar
Example contract source: https://github.com/DLC-link/dlc-clarity-smart-contract/blob/master/example/sample-protocol-contract.clar
This contract lets the associated application use oracle pricing data in their calculation of the DLC payout. For example, if your application lets users bet on the future price of BTC (or any other coin), you simply implement a function that uses this data to build the payout ratio, refer to it as a callback, and connect to the DLC.Link management contract. DLC.Link will fetch the pricing data, await for your contracts payout calculation, and then close the DLC accordingly.
By fetching the price of the associated asset used for this contract, we hope to abstract some complexity away from developers, leaving them more time to create great products with delightful user experiences.
Contract source: https://github.com/DLC-link/dlc-redstone-smart-contract/blob/main/contracts/dlc-manager-priced.clar
Example contract source: https://github.com/DLC-link/dlc-redstone-smart-contract/blob/main/example/sample-protocol-contract.clar
This contract makes it possible to open and close DLCs for a BTC-backed loan. It has built-in liquidation handling, and a way to calculate payout-curve points, which are then signed by our DLC Oracles. The current price of the underlying asset being used as collateral or loan will be fetched and used in calculation by the DLC.Link contract, removing that complexity from the developer.
Parameters you can pass in include the total loan amount, at what LTV (loan-to-value) ratio the liquidation should occur, an associated liquidation fee, etc.
With this contract we hope to abstract away much of the complexity of managing loan payouts away from developers, leaving them more time to create great products with delightful user experiences.
Contract source: https://github.com/DLC-link/dlc-stacks-loan-contract/blob/master/contracts/dlc-manager-loan.clar
Example contract source: https://github.com/DLC-link/dlc-stacks-loan-contract/blob/master/example/sample-protocol-contract.clar