Differentiating itself and improving on the design of other wrapped token protocols, BTC Proxy utilizes a side-chain to “RELAY” the confirmations of Bitcoin transactions to the ETH smart contract. The Relay side-chain is significant because it allows for further transparency and the pairing of both ETH and BTC transactions on the block for confirmation.
Importantly, this design reduces the enormous cost of verifying BTC blocks on the ETH smart contract and speeds up minting and redemption functions to real-time settlement. No intermediaries are required to execute the transaction.
To receive BTCpx for BTC, a user connects to BTCpx ethereum smart contract via Metamask. Following the smart contract connection, a bitcoin address is generated for the transaction via REST API call. This bitcoin address is unique and a new address is generated for every transaction in the platform.
Upon successfully generating the bitcoin address, the user needs to submit the bitcoin address to the smart contract. This bitcoin address is mapped against the ethereum address of the user. The mapping of bitcoin and ethereum addresses is a paid transaction.
When the user sends bitcoins to the address, the BTCpx backend in the dark node detects the transaction. Additional processes are followed as below:
The transaction is verified if it’s valid or not.
Transaction hash, raw hex, block height, and block header are sent to the Smart contract in Matic Network.
Transaction raw hex is decoded, and the transaction hash is extracted from the hex. Submitted hash and decoded hash from raw hex are verified.
If everything matches, then the transaction hash is verified in the current block and the current block is also verified.
The transaction’s raw hex is sent to the ethereum smart contract via side-chain data transfer.
Inside the ethereum smart contract, the transaction raw hex is decoded.
Upon decoding the transaction, transaction inputs, outputs are extracted.
Outputs include amount and address script. The address script is matched with the bitcoin address entered by the user.
If the address matches then corresponding tokens are ready to be claimed by the user.