The xDai token is minted when Dai is transferred from Ethereum to the xDai Chain using the xDai Bridge. During the transfer process, a block reward contract is invoked to mint xDai to a user's account. Because contract calls are made from the consensus engine to create xDai tokens, balance updates are more difficult to trace than simple value transfers.
- A user sends a transaction to the bridge contract on Ethereum to initiate a transfer.
- The transfer is approved on the Ethereum side and the user's Dai balance is reduced accordingly.
- Bridge validator oracles invoke the
executeAffirmation
method to confirm the transfer request. - When enough confirmations are collected (a majority of oracles must confirm), the bridge contract on xDai calls the xDai block reward contract.
- The block reward contract records the receiver(s) and amount(s) of xDai to mint. There may be more than 1 bridge transaction per block.
- The block reward contract is called by the AuRa consensus engine to update the EVM state and update the user's xDai balance.
You can view a receiver's address and amount of xDai received in the block reward contract logs. Whenever the executeAffirmation
method is called, it registers the following:
AddedReceiver(uint256 amount, address indexed receiver, address indexed bridge)
- To view xDai minting transactions from an account that received xDai, you can find the block and subsequent transaction using the coin history tab in BlockScout.
- More information on the OpenEthereum Block Reward contract is available here.