Skip to main content

๐Ÿช™ Minting Logic

Overviewโ€‹

The minting process of **rBTC-SYNTH** is triggered only after a user successfully verifies their BTC holdings through ReserveBTCโ€™s system.

This logic ensures that:

  • Tokens are minted only in response to real BTC deposits.
  • Users cannot mint tokens arbitrarily.
  • The system is automatic, verifiable, and resistant to fraud.

๐Ÿงฎ Minting Conditionsโ€‹

A synthetic token is minted only if all of the following are true:

  1. The user has submitted their BTC and ETH addresses to ReserveBTC.io.
  2. A unique verification BTC address and checksum amount were generated.
  3. The user sent exactly the assigned BTC amount to the verification address.
  4. The system detected the correct transaction.
  5. The ETH address is valid and stored.
  6. The BTC reserve has not already been minted.

โœ… Once verified, the system triggers the mint() function inside the smart contract.


โš™๏ธ Smart Contract Minting Logicโ€‹

function reportVerifiedBalance(address ethAddress, uint256 amountBtc) external onlyOracle {
require(!_alreadyMinted[ethAddress], "Already minted");
_mint(ethAddress, amountBtc);
_alreadyMinted[ethAddress] = true;
}
  • The reportVerifiedBalance function can only be called by the Chainlink Oracle.
  • The ETH address can only be minted once (soulbound model).
  • If the BTC balance grows over time, additional minting is allowed (see below).

โž• Dynamic Mintingโ€‹

If the same BTC address is topped up later:

  • The backend re-verifies the new total balance.
  • Only the delta is minted.
  • The new amount is added to the ETH holderโ€™s existing rBTC-SYNTH balance.

โœ… Example:โ€‹

If initially 0.25 BTC was verified, and later the address receives 0.10 more BTC:

0.25 BTC โ†’ 0.25 rBTC-SYNTH  
+0.10 BTC โ†’ +0.10 rBTC-SYNTH
Final balance: 0.35 rBTC-SYNTH

๐Ÿ”’ Anti-Fraud Protectionsโ€‹

  • Only the Oracle can trigger minting. Users cannot call the function directly.
  • One-time mint lock per address (unless verified delta increases).
  • Checksum enforcement: exact match required to prevent random sends.
  • No manual input: All triggers are automated.

๐Ÿ” View Functionsโ€‹

DApps and DeFi protocols can read minted balances using:

function balanceOf(address ethUser) external view returns (uint256);

No approvals, no transfers, no delegated minting โ€” fully soulbound.


๐Ÿ› ๏ธ Next:โ€‹

Mint on proof. No keys. No permission. Just Bitcoin.