Developer

Faucet Bridge

BMCFaucetBridge.sol acts as a bridge between the Ethereum network and the Boomchain network, allowing users to deposit Ethereum-based tokens (ETH, WBTC, USDC).

These tokens can be withdrawn from the contract only through the assigned contract owner.

These supported tokens are hardcoded in the constructor and cannot be changed.

Key features

  • buyBMCWithETH: A function to exchange ETH for BMC, requiring a transaction nonce, the amount of ETH, and a frontend signature.

  • buyBMCWithToken: A function to exchange USDC, WBTC for BMC, requiring a transaction nonce, the token amount, and a frontend signature.

  • Signature Verification: Emphasizes the use of transaction signatures to authenticate operations initiated through a frontend interface.

  • Pausable: Inherits from OpenZeppelin's Pausable contract, allowing the contract's operations to be paused by the owner for emergency or maintenance reasons.

  • Ownership: Utilizes OpenZeppelin's Ownable contract to restrict certain operations (like pausing the contract) to the owner.

For operations like token exchange, signatures may be required to verify transactions initiated through the frontend. The use of signatures and nonces focus on security, preventing replay attacks and ensuring transactions are authentic.

Settlement

Settlement.sol is a contract on the Boomchain network that acts as a settlement layer for the Boomswap Faucet where assets (bUSD, bETH or bBTC) are swapped for BMC. This process begins when a user deposits corresponding tokens into the faucet bridge on the Ethereum chain. Subsequently, BMC is issued to the user's address that was used to interact with the faucet bridge.

To enable the swapping of these tokens (bUSD, bETH, and bBTC) for BMC, it is essential that the Settlement contract is is adequately funded with bUSD, bETH, and bBTC to be able to swap these tokens for BMC through Boomswap.

These supported tokens are hardcoded in the constructor and cannot be changed.

Access Control - Only accounts with specific roles can initiate certain operations:

  • Owner can pause the contract, resolve and swap tokens for BMC, and withdraw funded tokens from the contract.

  • Bridger initiates the token swap operation and can be the frontend signer address.


Last updated