OrdiSynth
Ordinal Synthetic Market to convert bridged Ordinal to an ERC20, increasing interopability.
Screenshots





Problem Statement
This project combines a Bitcoin Ordinal / Runes, smart contracts and browser-based frontend to allow users to mint and redeem synthetic ERC20 tokens of their favourite ordinals / runes on Rootstock instantly.The users can use this synthetic ERC20 token for better interoperability, allowing it to be used in money markets, staking, yield farming and Dexes. This synthetic also allow users to own a fraction of the token instead of the entire, leading to better capital efficiency.Our platform allows users to do 4 main actions:Mint Synthetic ERC20 using their bridged ERC1155 Ordinal / RuneRedeem a bridged ERC1155 Ordinal / Rune in the contract using a Synthetic ERC20Add Liquidity to a Uniswap V2 Liquidity Pool by adding RBTC and the bridged ERC1155 (using syntehtic ERC20 under the hood)Swap for a bridged ERC1155 Ordinal / Rune in the contract using RBTC (swapping for the synthetic ERC20 in the pool and redeeming using the synthetic ERC20 under the hood)
Solution
This project comprises of 3 main parts:Smart ContractsFrontendIndexerThere are 3 main smart contracts, all built with Solidity and Hardhat. We used the rootstock hardhat starter kit was especially helpful in getting us started. The first smart contract is the RuneToken ERC1155 token that is adapted from the Rootstock Rune Bridge RuneToken. This represents the Bridged Ordinal / Rune from BTC to Rootstock. Secondly, it's the SyntheticToken which is essentially just a typical ERC20 token. Lastly, it's the OrdiSynth contract that interacts with UniswapV2 Router, RuneToken and the Synthetic Token. OrdiSynth has 4 main functions, minting, redeeming, adding liquidity and swapping. The last 2 functions are built on top of the first 2 minting and redeeming which are essentially a lock and mint system.Similarly, the frontend was built with the Rootstock wagmi starter kit which was equally helpful. We used wagmi to interface with the OrdiSynth smart contract and provided a testing page to allow users to mint test RuneTokens to test the project out.Lastly, we created an Envio Indexer to utilise the hypersync feature to listen for the events of both the OrdiSynth and Synthetic Token smart contract. We were able to use the RPC sync feature to use our own rpc configuration for Rootstock.
Hackathon
ETHOnline 2024
2024
Prizes
- 🏆
Best Runes or Ordinals project on Rootstock
Rootstock
Contributors
- PohSayKeong
21 contributions
- wr1159
20 contributions