The reference smart contracts are Work in Progress
The reference smart contracts are planned to be written for Solana and any Ethereum compatible blockchain networks. It is designed for creating a proof-of-backhaul (PoB) challenge that allows provers and challengers to participate in challenges
The smart contracts should be treated as reference implementations only
This function is used to initiate a PoB challenge. The caller of this function is required to provide the parameters such as bump value, amount, number of accounts, and timeout. The caller of this function is referred to as the payer and the participating users are referred to as provers & challengers. This function initiates an escrow transaction to transfer the Challenge Fee from Payer to the Smart Contract Account
Initiated by: Payer
Entities involved: Payer, Prover
number of challengers involved
This function is used to end the PoB challenge and distribute the fee to the challengers. The individual challenger fee is calculated based on the total amount provided by the payer and divided equally among the participating challengers.
This function is used to handle the case when the challenge times out. If the challenge times out, the total amount is transferred back to the payer's account.
The smart contract uses the following data structures:
Store: This structure holds the data required to manage the PoB challenge, including the amount, bump value, number of accounts, timeout, and expiration time.
AccountInfo: This structure holds the information of the accounts, including the key, balance, and data length.
This smart contract provides a reference solution for creating and managing PoB challenges on the Solana/Ethereum compatible blockchain networks. It provides a secure and transparent way for users to participate in the challenge and receive rewards.