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 qualified user initiates a minting request via the
FireBridge
contract.The
FireBridge
contract validates the request and records it.
Confirmation by FBTCMinter:
An entity with the
MINT_ROLE
calls theconfirmMintRequest
function on theFBTCMinter
contract.FBTCMinter
forwards the confirmation to theFireBridge
contract by calling itsconfirmMintRequest
function.The
FireBridge
contract processes the request and mints the appropriate amount of FBTC tokens.
Burning Workflow
Burning Request Initiation:
A qualified user initiates a burning request via the
FireBridge
contract.The
FireBridge
contract validates the request and records it.
Confirmation by FBTCMinter:
An entity with the
BURN_ROLE
calls theconfirmBurnRequest
function on theFBTCMinter
contract, providing the request hash, withdrawal transaction ID, and output index.FBTCMinter
forwards the confirmation to theFireBridge
contract by calling itsconfirmBurnRequest
function.The
FireBridge
contract processes the request and burns the appropriate amount of FBTC tokens.
Cross-Chain Workflow
Cross-Chain Request Initiation:
A qualified user initiates a cross-chain request via the
FireBridge
contract.The
FireBridge
contract validates the request and records it.
Confirmation by FBTCMinter:
An entity with the
CROSSCHAIN_ROLE
calls theconfirmCrosschainRequest
function on theFBTCMinter
contract, providing the request details.FBTCMinter
forwards the confirmation to theFireBridge
contract by calling itsconfirmCrosschainRequest
function.The
FireBridge
contract 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
FireBridge
contract.
Batch Confirmation by FBTCMinter:
An entity with the
CROSSCHAIN_ROLE
calls thebatchConfirmCrosschainRequest
function on theFBTCMinter
contract, providing an array of requests.FBTCMinter
iterates through the array and forwards each request confirmation to theFireBridge
contract.The
FireBridge
contract processes each request and initiates the respective cross-chain transfers.
Last updated