
Bitcoin NFT Leaderboard
DLC.Link allows for minting NFTs backed by native Bitcoin. With The Graph we pulled complex blockchain data to show a leaderboard of NFTs minted so far.
Demo
About
The problem it solves ## *Billions of dollars in Bitcoin capital is waiting to be used in smart contracts for lending, hedging, and trading.* Although Bitcoin is the largest digital asset, it does not support smart contracts. Today, it’s not possible to take a loan on Bitcoin without first transferring it to a custodian or a bridge. Custodian failures and bridge hacks, however, have led to over $140Bn in losses to date. [DLC.link](http://dlc.link) implements an MIT invention ([discreet-log-contracts.md](additional-resources/discreet-log-contracts.md "mention")) that makes it easy for app developers to integrate native Bitcoin. Their platform locks Bitcoin into on-chain escrow, from where it can be controlled by Ethereum and other smart contract chains. This “trustless bridge” enables lending, trading, derivatives and more. The DLC.Link ERC-721 NFT is a new product designed to facilitate the safe and easy leveraging of bitcoin on other chains. The ERC-721 NFT is designed to represent a "proof-of-collateral" for BTC locked in a DLC. The NFT image lists the amount of BTC locked in it, while its metadata is stored on-chain and on decentralized storage systems such as IPFS. The NFT is fully transferable, and it can be used on any platform that supports the ERC-721 standard. Now, by using The Graph, we are for the first time making complex queries against our on-chain data. We have built a leaderboard which reads the history of the contract, finds the largest Bitcoin backed NFTs to date, and joins them with the creator's address. We've gamified DLC backed NFTs!
How it's made
Challenges we ran into This was our first time using the GraphQL language and pattern in general, so there was some learning involved. We also realized that, since we hadn't been using the blockchain indexed graph thus far, we solved similar problems by writing more complex smart contracts with complex functions for search and filtering. Now we see how using The Graph we could create a much simpler, and gas-friendly, contract, and use data from the indexed graph to support all our FrontEnd needs from before, and implement new features we didn't imagine before.