FBTC Minter
The FBTCMinter contract is a critical component in the FBTC protocol that manages the confirmation of minting, burning, and cross-chain requests. It operates under a role-based access control system to ensure secure and efficient processing of these operations.
Key Features
Role-Based Access Control
Utilizes specific roles for minting, burning, and cross-chain operations to ensure only authorized entities can perform these actions.
MINT_ROLE: Responsible for confirming minting requests.BURN_ROLE: Responsible for confirming burning requests.CROSSCHAIN_ROLE: Responsible for confirming cross-chain requests.
Bridge Integration
The FBTCMinter interacts with the FireBridge contract to execute its functions, ensuring seamless integration within the FBTC ecosystem.
High-level Workflow
The FBTCMinter contract works closely with the FireBridge contract to ensure secure and efficient confirmation of minting, burning, and cross-chain requests. Below is a detailed workflow for each operation:
Minting Workflow
Minting Request Initiation:
A merchant initiates a minting request via the
FireBridgecontract.The
FireBridgecontract validates the request and records it.
Confirmation by FBTCMinter:
An entity with the
MINT_ROLEcalls theconfirmMintRequestfunction on theFBTCMintercontract.FBTCMinterforwards the confirmation to theFireBridgecontract by calling itsconfirmMintRequestfunction.The
FireBridgecontract processes the request and mints the appropriate amount of FBTC tokens.
Burning Workflow
Burning Request Initiation:
A merchant initiates a burning request via the
FireBridgecontract.The
FireBridgecontract validates the request and records it.
Confirmation by FBTCMinter:
An entity with the
BURN_ROLEcalls theconfirmBurnRequestfunction on theFBTCMintercontract, providing the request hash, withdrawal transaction ID, and output index.FBTCMinterforwards the confirmation to theFireBridgecontract by calling itsconfirmBurnRequestfunction.The
FireBridgecontract processes the request and burns the appropriate amount of FBTC tokens.
Cross-Chain Workflow
Cross-Chain Request Initiation:
A merchant initiates a cross-chain request via the
FireBridgecontract.The
FireBridgecontract validates the request and records it.
Confirmation by FBTCMinter:
An entity with the
CROSSCHAIN_ROLEcalls theconfirmCrosschainRequestfunction on theFBTCMintercontract, providing the request details.FBTCMinterforwards the confirmation to theFireBridgecontract by calling itsconfirmCrosschainRequestfunction.The
FireBridgecontract processes the request and initiates the cross-chain transfer.
Batch Confirmation Workflow
Batch Cross-Chain Request Initiation:
Multiple cross-chain requests are initiated and recorded by the
FireBridgecontract.
Batch Confirmation by FBTCMinter:
An entity with the
CROSSCHAIN_ROLEcalls thebatchConfirmCrosschainRequestfunction on theFBTCMintercontract, providing an array of requests.FBTCMinteriterates through the array and forwards each request confirmation to theFireBridgecontract.The
FireBridgecontract processes each request and initiates the respective cross-chain transfers.
Last updated