The Proxy Relay
How BTC Proxy confirms Deposits at the Custodian.
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 Proxy Relay side-chain is significant because it allows for further transparency and can validate any deposit onto a BTC address.
This design verifies all BTC blocks and transactions onto the Matic Chain for very cost efficiently and then relays the transaction to either a Matic or Ethereum smart contract to mint or redeem BTCpx tokens. The Proxy Relay can take upto 30 mins to execute a transaction but all BTC/Matic/ETH confirmations are displayed in real time for full transparency and real-time settlement. No intermediaries are required to execute the transaction.
View of the BTCpx Analytics and Confirmations
To receive BTCpx for BTC, a user connects to app.btcpx.io with with Metamask using either the Polygon/Matic or Ethereum Mainnet Networks. Following the 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 this bitcoin address is mapped against the ethereum wallet address of the user. The mapping of bitcoin and ethereum addresses allows the protocol to identify where to send the BTCpx tokens after the BTC deposit has been confirmed.
When the user sends their Bitcoin to the address, the Proxy Relay detects the transaction. Additional processes are followed as below:
- 1.The transaction is verified if it’s valid or not.
- 2.Transaction hash, raw hex, block height, and block header are sent to the Smart contract in Matic Network.
- 3.Transaction raw hex is decoded, and the transaction hash is extracted from the hex. Submitted hash and decoded hash from raw hex are verified.
- 4.If everything matches, then the transaction hash is verified in the current block and the current block is also verified.
- 5.The transaction’s raw hex is sent to the Matic/Ethereum smart contract via side-chain data transfer.
- 6.Inside the Matic/Ethereum smart contract, the transaction raw hex is decoded.
- 7.Upon decoding the transaction, transaction inputs, outputs are extracted.
- 8.Outputs include amount and address script. The address script is matched with the Bitcoin address entered by the user.
- 9.If the address matches then corresponding tokens are sent to the users wallet.