project screenshot 1
project screenshot 2
project screenshot 3
project screenshot 4
project screenshot 5

OrdiSynth

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

OrdiSynth

Created At

ETHOnline 2024

Winner of

Rootstock - Best Runes or Ordinals project on Rootstock

Project Description

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:

  1. Mint Synthetic ERC20 using their bridged ERC1155 Ordinal / Rune
  2. Redeem a bridged ERC1155 Ordinal / Rune in the contract using a Synthetic ERC20
  3. Add Liquidity to a Uniswap V2 Liquidity Pool by adding RBTC and the bridged ERC1155 (using syntehtic ERC20 under the hood)
  4. 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)

How it's Made

This project comprises of 3 main parts:

  1. Smart Contracts
  2. Frontend
  3. Indexer

There 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.

background image mobile

Join the mailing list

Get the latest news and updates