Independent extension of Frankencoin mechanics

Normalize decimals, not exchange rates

A same-chain source bridge locks source tokens and mints equal nominal local units under a local cap and horizon.

Source units, local units and redemption credit
Source raw depositsourceDecimals ≤ 18
decimalMultiplier10^(18 − sourceDecimals)
Local 18-decimal mintminted and limit use local raw units
Local burn → floor to whole source unit → immediate source transfer or source-denominated credit → permissionless payoutCredit
The multiplier changes raw decimal representation only. Equal nominal units are not FX conversion, and burnAndCredit does not pay source tokens until payoutCredit is called.

Use method-specific units

The source token must have fixed decimals no greater than 18. The local token always uses 18 decimals, and decimalMultiplier = 10^(18 − sourceDecimals). mint and mintTo accept source raw units, transfer them from the caller and mint amount × decimalMultiplier local raw units to the target.

For six-decimal Test USDC, the multiplier is 1e12. Thus 100 × 1e6 source raw units produce 100 × 1e18 local raw units: 100 nominal source units to 100 nominal local units. The test token is valueless, so this fixture is neither fiat backing nor an FX rate.

Cap and horizon use different checks

minted and limit are both outstanding local 18-decimal raw amounts, not source raw amounts. A mint that brings minted exactly to limit is allowed; exceeding the cap reverts. Burning decreases minted by the actual rounded local amount burned.

The bridge horizon is deployment time plus 52 weeks. New minting reverts only when now > horizon, so minting is still accepted exactly at the horizon and stops afterward. Redemption methods do not have that horizon check and can continue after it, subject to source-token behavior and available bridge assets.

Burning rounds down to a whole source unit

burn, burnAndSend and burnAndCredit accept local 18-decimal raw amounts. The bridge computes sourceAmount = floor(localAmount / decimalMultiplier) and burns only sourceAmount × decimalMultiplier. Any local remainder stays unburned with the holder. If the input is smaller than one whole source raw unit, the rounded source and burned amounts are zero.

burn sends source tokens to the caller; burnAndSend sends them to the selected target. These are immediate transfers, unlike credits.

Credits require a later payout

burnAndCredit(target, localAmount) burns the rounded local amount from the caller and records source raw units in credits[target]. It does not transfer source tokens to the target at that point. Anyone can later call payoutCredit(target), which pays the entire outstanding credit and clears it. The bridge's balanceOf(account) read returns this source-denominated credit, not a local-token balance.

Credits can be useful when a recipient cannot immediately receive the source token. They do not remove issuer blacklist, pause, upgrade or transfer restrictions, and a recorded credit is not evidence that payout has occurred.

Source trust remains a launch gate

This is a same-chain lock/mint module, not a cross-chain messaging bridge and not backing for unrelated position issuance. Production requires a separately approved DogeOS source asset and reviewed per-currency caps. Issuer control, upgradeability, minting, pause, blacklist, decimals, ERC20 behavior, redemption and liquidity assumptions remain unresolved. No production source asset is selected. The configured test bridges use deployer-minted tUSDC, not production USDC.

Read before planning

Read source and local token addresses, decimals, multiplier, local cap, local minted amount, horizon, source balance and account credit at an identified block. Preserve both raw-unit systems in any JSON plan. Unknown or stale cap/credit reads are unavailable, not zero. For the test genesis relationship to pool shares, see reserves and equity.