// SPDX-License-Identifier: MIT
pragma solidity 0.8.28;
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import {Math} from "@openzeppelin/contracts/utils/math/Math.sol";
import {IDexMigrator} from "./interfaces/IDexMigrator.sol";
import {
IUniswapV2Router02,
IUniswapV2Factory,
IUniswapV2Pair,
IWETH
} from "./interfaces/IUniswapV2Router02.sol";
interface ICurveRegistry {
function curveOf(address token) external view returns (address);
}
/// @title DexMigrator
/// @notice When a curve sells out, this contract plants the raise and the
/// token reserve as liquidity on a UniswapV2-style DEX and sends the
/// LP tokens to the burn address, locking the liquidity forever.
///
/// @dev Liquidity is added with the pair's low-level `mint()` rather than
/// `Router02.addLiquidityETH`. The router path takes the migrator's
/// amounts as *exact minimums*, so a squatter who pre-creates the
/// token/WETH pair with a skewed ratio makes the router's optimal-amount
/// check revert and freezes a sold-out curve (a griefing DoS). Low-level
/// `mint()` has no min-amount check, so it cannot be blocked.
///
/// A pre-seeded pair is also an *economic* threat: UniswapV2's mint
/// donates the imbalanced side to existing LPs, so a squatter's LP could
/// skim the graduation raise. To close that, if the pair already has
/// reserves the migrator first swaps it back to the curve's final price
/// (`_rebalanceToTarget`), then adds strictly proportional liquidity
/// (`_matchedAmounts`) so no value is donated. Any small remainder is
/// locked in the burn address, never routed to a caller.
contract DexMigrator is IDexMigrator {
using SafeERC20 for IERC20;
address internal constant BURN_ADDRESS =
0x000000000000000000000000000000000000dEaD;
IUniswapV2Router02 public immutable router;
address public immutable weth;
ICurveRegistry public registry;
address public immutable deployer;
event Migrated(
address indexed token,
address indexed pair,
uint256 tokenAmount,
uint256 nativeAmount,
uint256 liquidity
);
error OnlyRegisteredCurve();
error RegistryAlreadySet();
error OnlyDeployer();
error NoLiquidityMinted();
constructor(IUniswapV2Router02 router_) {
router = router_;
weth = router_.WETH();
deployer = msg.sender;
}
/// @notice One-time wiring: the factory and migrator reference each other,
/// so the registry is set right after the factory deploys.
function setRegistry(ICurveRegistry registry_) external {
if (msg.sender != deployer) revert OnlyDeployer();
if (address(registry) != address(0)) revert RegistryAlreadySet();
registry = registry_;
}
/// @inheritdoc IDexMigrator
function migrate(
address token,
uint256 tokenAmount
) external payable returns (address pair, uint256 liquidity) {
if (registry.curveOf(token) != msg.sender) revert OnlyRegisteredCurve();
IUniswapV2Factory dexFactory = IUniswapV2Factory(router.factory());
pair = dexFactory.getPair(token, weth);
if (pair == address(0)) {
pair = dexFactory.createPair(token, weth);
}
IWETH(weth).deposit{value: msg.value}();
uint256 tokenBal = tokenAmount;
uint256 wethBal = msg.value;
// If the canonical pair was pre-seeded (a squatter set a skewed price),
// arbitrage it back to our target price first. Otherwise the balanced
// deposit below would be partly donated to the squatter's LP via
// UniswapV2's imbalance rule, letting them skim the graduation raise.
(uint256 res0, uint256 res1) = _rawReserves(pair);
if (res0 != 0 || res1 != 0) {
(tokenBal, wethBal) = _rebalanceToTarget(pair, token, tokenBal, wethBal);
}
// Add liquidity matched to the pool's current ratio. A strictly
// proportional add mints LP without donating value to any pre-existing
// LP holder, so nothing can be skimmed regardless of who seeded first.
(uint256 addToken, uint256 addWeth) =
_matchedAmounts(pair, token, tokenBal, wethBal);
IERC20(token).safeTransfer(pair, addToken);
IWETH(weth).transfer(pair, addWeth);
liquidity = IUniswapV2Pair(pair).mint(BURN_ADDRESS);
if (liquidity == 0) revert NoLiquidityMinted();
// Lock any small remainder in the burn address; it is never routed to
// any caller, so a squatter cannot profit from forcing a remainder.
uint256 leftToken = tokenBal - addToken;
uint256 leftWeth = wethBal - addWeth;
if (leftToken > 0) IERC20(token).safeTransfer(BURN_ADDRESS, leftToken);
if (leftWeth > 0) IWETH(weth).transfer(BURN_ADDRESS, leftWeth);
emit Migrated(token, pair, addToken, addWeth, liquidity);
}
/// @dev Reserves oriented as (token, weth) for `pair`.
function _reserves(
address pair,
address token
) internal view returns (uint256 resToken, uint256 resWeth) {
(uint256 r0, uint256 r1) = _rawReserves(pair);
return IUniswapV2Pair(pair).token0() == token ? (r0, r1) : (r1, r0);
}
function _rawReserves(address pair) internal view returns (uint256, uint256) {
(uint112 r0, uint112 r1, ) = IUniswapV2Pair(pair).getReserves();
return (uint256(r0), uint256(r1));
}
/// @dev The proportional amounts to add at the pool's current ratio (all of
/// one side, the matching fraction of the other). Empty pool: add both
/// in full to set the initial price.
function _matchedAmounts(
address pair,
address token,
uint256 tokenBal,
uint256 wethBal
) internal view returns (uint256 addToken, uint256 addWeth) {
(uint256 resToken, uint256 resWeth) = _reserves(pair, token);
if (resToken == 0 || resWeth == 0) return (tokenBal, wethBal);
uint256 tokenNeeded = Math.mulDiv(wethBal, resToken, resWeth);
if (tokenNeeded <= tokenBal) return (tokenNeeded, wethBal);
return (tokenBal, Math.mulDiv(tokenBal, resWeth, resToken));
}
/// @dev Swap within a pre-seeded pair to move its price to our target
/// (wethBal / tokenBal), so the subsequent add is balanced. Uses the
/// no-fee constant-product target reserve; the real swap's 0.3% fee
/// only ever undershoots, which the matched add then absorbs.
function _rebalanceToTarget(
address pair,
address token,
uint256 tokenBal,
uint256 wethBal
) internal returns (uint256, uint256) {
(uint256 resToken, uint256 resWeth) = _reserves(pair, token);
if (resToken == 0 || resWeth == 0) return (tokenBal, wethBal);
bool tokenIs0 = IUniswapV2Pair(pair).token0() == token;
// Target weth reserve: sqrt(resToken * resWeth * wethBal / tokenBal).
uint256 targetWeth =
Math.sqrt(Math.mulDiv(Math.mulDiv(resToken, resWeth, tokenBal), wethBal, 1));
if (targetWeth > resWeth) {
// Pool underprices the token: buy tokens (weth in) to raise price.
uint256 wethIn = targetWeth - resWeth;
if (wethIn > wethBal) wethIn = wethBal;
uint256 tokenOut = _amountOut(wethIn, resWeth, resToken);
if (tokenOut == 0) return (tokenBal, wethBal);
IWETH(weth).transfer(pair, wethIn);
IUniswapV2Pair(pair).swap(
tokenIs0 ? tokenOut : 0,
tokenIs0 ? 0 : tokenOut,
address(this),
""
);
return (tokenBal + tokenOut, wethBal - wethIn);
} else if (targetWeth < resWeth) {
// Pool overprices the token: sell tokens (token in) to lower price.
uint256 targetToken = Math.mulDiv(resToken, resWeth, targetWeth);
uint256 tokenIn = targetToken > resToken ? targetToken - resToken : 0;
if (tokenIn > tokenBal) tokenIn = tokenBal;
uint256 wethOut = _amountOut(tokenIn, resToken, resWeth);
if (wethOut == 0) return (tokenBal, wethBal);
IERC20(token).safeTransfer(pair, tokenIn);
IUniswapV2Pair(pair).swap(
tokenIs0 ? 0 : wethOut,
tokenIs0 ? wethOut : 0,
address(this),
""
);
return (tokenBal - tokenIn, wethBal + wethOut);
}
return (tokenBal, wethBal);
}
/// @dev UniswapV2 getAmountOut (0.3% fee).
function _amountOut(
uint256 amountIn,
uint256 reserveIn,
uint256 reserveOut
) internal pure returns (uint256) {
uint256 inWithFee = amountIn * 997;
return (inWithFee * reserveOut) / (reserveIn * 1000 + inWithFee);
}
}[
{
"type": "constructor",
"inputs": [
{
"name": "router_",
"type": "address",
"internalType": "contract IUniswapV2Router02"
}
],
"stateMutability": "nonpayable"
},
{
"name": "NoLiquidityMinted",
"type": "error",
"inputs": []
},
{
"name": "OnlyDeployer",
"type": "error",
"inputs": []
},
{
"name": "OnlyRegisteredCurve",
"type": "error",
"inputs": []
},
{
"name": "RegistryAlreadySet",
"type": "error",
"inputs": []
},
{
"name": "SafeERC20FailedOperation",
"type": "error",
"inputs": [
{
"name": "token",
"type": "address",
"internalType": "address"
}
]
},
{
"name": "Migrated",
"type": "event",
"inputs": [
{
"name": "token",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "pair",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "tokenAmount",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
},
{
"name": "nativeAmount",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
},
{
"name": "liquidity",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
}
],
"anonymous": false
},
{
"name": "deployer",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "address"
}
],
"stateMutability": "view"
},
{
"name": "migrate",
"type": "function",
"inputs": [
{
"name": "token",
"type": "address",
"internalType": "address"
},
{
"name": "tokenAmount",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [
{
"name": "pair",
"type": "address",
"internalType": "address"
},
{
"name": "liquidity",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "payable"
},
{
"name": "registry",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "contract ICurveRegistry"
}
],
"stateMutability": "view"
},
{
"name": "router",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "contract IUniswapV2Router02"
}
],
"stateMutability": "view"
},
{
"name": "setRegistry",
"type": "function",
"inputs": [
{
"name": "registry_",
"type": "address",
"internalType": "contract ICurveRegistry"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"name": "weth",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "address"
}
],
"stateMutability": "view"
}
]0x60e060405234801561001057600080fd5b5060405161135438038061135483398101604081905261002f916100cb565b6001600160a01b0381166080819052604080516315ab88c960e31b8152905163ad5c4648916004808201926020929091908290030181865afa158015610079573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061009d91906100cb565b6001600160a01b031660a052503360c0526100ef565b6001600160a01b03811681146100c857600080fd5b50565b6000602082840312156100dd57600080fd5b81516100e8816100b3565b9392505050565b60805160a05160c0516111ff610155600039600081816101310152610192015260008181606c01528181610358015281816103fe0152818161047801528181610574015281816106cd015261096301526000818161016501526102b901526111ff6000f3fe6080604052600436106100555760003560e01c80633fc8cef31461005a5780637b103999146100ab578063a91ee0dc146100cb578063ad68ebf7146100ed578063d5f394881461011f578063f887ea4014610153575b600080fd5b34801561006657600080fd5b5061008e7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100b757600080fd5b5060005461008e906001600160a01b031681565b3480156100d757600080fd5b506100eb6100e636600461102b565b610187565b005b6101006100fb366004611048565b61021c565b604080516001600160a01b0390931683526020830191909152016100a2565b34801561012b57600080fd5b5061008e7f000000000000000000000000000000000000000000000000000000000000000081565b34801561015f57600080fd5b5061008e7f000000000000000000000000000000000000000000000000000000000000000081565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146101d05760405163618bbdd560e01b815260040160405180910390fd5b6000546001600160a01b0316156101fa576040516307a554d960e01b815260040160405180910390fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b600080546040516302d6e23f60e11b81526001600160a01b038581166004830152839233929116906305adc47e90602401602060405180830381865afa15801561026a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061028e9190611074565b6001600160a01b0316146102b55760405163084458e960e11b815260040160405180910390fd5b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa158015610315573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103399190611074565b60405163e6a4390560e01b81526001600160a01b0387811660048301527f0000000000000000000000000000000000000000000000000000000000000000811660248301529192509082169063e6a4390590604401602060405180830381865afa1580156103ab573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103cf9190611074565b92506001600160a01b038316610476576040516364e329cb60e11b81526001600160a01b0386811660048301527f00000000000000000000000000000000000000000000000000000000000000008116602483015282169063c9c65396906044016020604051808303816000875af115801561044f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104739190611074565b92505b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b1580156104d157600080fd5b505af11580156104e5573d6000803e3d6000fd5b50879350349250600091508190506104fc876107a5565b9150915081600014158061050f57508015155b1561052657610520878a8686610825565b90945092505b600080610535898c8888610bd5565b909250905061054e6001600160a01b038c168a84610c47565b60405163a9059cbb60e01b81526001600160a01b038a81166004830152602482018390527f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb906044016020604051808303816000875af11580156105bd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105e19190611091565b506040516335313c2160e11b815261dead60048201526001600160a01b038a1690636a627842906024016020604051808303816000875af115801561062a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061064e91906110b3565b9750876000036106715760405163f564880560e01b815260040160405180910390fd5b600061067d83886110e2565b9050600061068b83886110e2565b905081156106a9576106a96001600160a01b038e1661dead84610c47565b80156107445760405163a9059cbb60e01b815261dead6004820152602481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063a9059cbb906044016020604051808303816000875af115801561071e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107429190611091565b505b60408051858152602081018590529081018b90526001600160a01b03808d1691908f16907f57aa04076c8e8e00f17b6f082eb7c65ec1aa90f07da036638ccfcb07dcae6cc89060600160405180910390a35050505050505050509250929050565b600080600080846001600160a01b0316630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa1580156107e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061080d9190611117565b506001600160701b0391821697911695509350505050565b6000806000806108358888610c85565b915091508160001480610846575080155b15610858578585935093505050610bcc565b6000876001600160a01b0316896001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa1580156108a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108c69190611074565b6001600160a01b031614905060006108f26108ed6108e586868c610d29565b896001610d29565b610ddf565b905082811115610a8b57600061090884836110e2565b9050878111156109155750865b6000610922828688610f38565b90508060000361093d57898997509750505050505050610bcc565b60405163a9059cbb60e01b81526001600160a01b038d81166004830152602482018490527f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb906044016020604051808303816000875af11580156109ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109d09190611091565b508b6001600160a01b031663022c0d9f856109ec5760006109ee565b825b866109f957836109fc565b60005b6040516001600160e01b031960e085901b16815260048101929092526024820152306044820152608060648201526000608482015260a401600060405180830381600087803b158015610a4e57600080fd5b505af1158015610a62573d6000803e3d6000fd5b50505050808a610a729190611167565b610a7c838b6110e2565b97509750505050505050610bcc565b82811015610bc1576000610aa0858584610d29565b90506000858211610ab2576000610abc565b610abc86836110e2565b905089811115610ac95750885b6000610ad6828888610f38565b905080600003610af2578a8a9850985050505050505050610bcc565b610b066001600160a01b038d168e84610c47565b8c6001600160a01b031663022c0d9f86610b205782610b23565b60005b87610b2f576000610b31565b835b6040516001600160e01b031960e085901b16815260048101929092526024820152306044820152608060648201526000608482015260a401600060405180830381600087803b158015610b8357600080fd5b505af1158015610b97573d6000803e3d6000fd5b50505050818b610ba791906110e2565b610bb1828c611167565b9850985050505050505050610bcc565b878795509550505050505b94509492505050565b600080600080610be58888610c85565b915091508160001480610bf6575080155b15610c08578585935093505050610bcc565b6000610c15868484610d29565b9050868111610c2b579350849250610bcc915050565b86610c37888486610d29565b9450945050505094509492505050565b610c548383836001610f7d565b610c8057604051635274afe760e01b81526001600160a01b038416600482015260240160405180910390fd5b505050565b600080600080610c94866107a5565b91509150846001600160a01b0316866001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ce0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d049190611074565b6001600160a01b031614610d19578082610d1c565b81815b9350935050509250929050565b6000806000610d388686610fe3565b9150915081600003610d5d57838181610d5357610d5361117a565b0492505050610dd8565b818411610d7457610d746003851502601118611001565b6000848688096000868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010185841190960395909502919093039390930492909217029150505b9392505050565b600060018211610ded575090565b816001600160801b8210610e065760809190911c9060401b5b680100000000000000008210610e215760409190911c9060201b5b6401000000008210610e385760209190911c9060101b5b620100008210610e4d5760109190911c9060081b5b6101008210610e615760089190911c9060041b5b60108210610e745760049190911c9060021b5b60048210610e805760011b5b600302600190811c90818581610e9857610e9861117a565b048201901c90506001818581610eb057610eb061117a565b048201901c90506001818581610ec857610ec861117a565b048201901c90506001818581610ee057610ee061117a565b048201901c90506001818581610ef857610ef861117a565b048201901c90506001818581610f1057610f1061117a565b048201901c9050610f2f818581610f2957610f2961117a565b04821190565b90039392505050565b600080610f47856103e5611190565b905080610f56856103e8611190565b610f609190611167565b610f6a8483611190565b610f7491906111a7565b95945050505050565b60405163a9059cbb60e01b60008181526001600160a01b038616600452602485905291602083604481808b5af192506001600051148316610fd7578383151615610fca573d6000823e3d81fd5b6000873b113d1516831692505b60405250949350505050565b60008060001983850993909202808410938190039390930393915050565b634e487b71600052806020526024601cfd5b6001600160a01b038116811461102857600080fd5b50565b60006020828403121561103d57600080fd5b8135610dd881611013565b6000806040838503121561105b57600080fd5b823561106681611013565b946020939093013593505050565b60006020828403121561108657600080fd5b8151610dd881611013565b6000602082840312156110a357600080fd5b81518015158114610dd857600080fd5b6000602082840312156110c557600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b818103818111156110f5576110f56110cc565b92915050565b80516001600160701b038116811461111257600080fd5b919050565b60008060006060848603121561112c57600080fd5b611135846110fb565b9250611143602085016110fb565b9150604084015163ffffffff8116811461115c57600080fd5b809150509250925092565b808201808211156110f5576110f56110cc565b634e487b7160e01b600052601260045260246000fd5b80820281158282048414176110f5576110f56110cc565b6000826111c457634e487b7160e01b600052601260045260246000fd5b50049056fea264697066735822122084a371f7f36473124014d045fc6fa5961aab6dc819a2c76c8d0fbed3be5c0a8c64736f6c634300081c003300000000000000000000000089e5db8b5aa49aa85ac63f691524311aeb649eba
0x6080604052600436106100555760003560e01c80633fc8cef31461005a5780637b103999146100ab578063a91ee0dc146100cb578063ad68ebf7146100ed578063d5f394881461011f578063f887ea4014610153575b600080fd5b34801561006657600080fd5b5061008e7f0000000000000000000000000bd7d308f8e1639fab988df18a8011f41eacad7381565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100b757600080fd5b5060005461008e906001600160a01b031681565b3480156100d757600080fd5b506100eb6100e636600461102b565b610187565b005b6101006100fb366004611048565b61021c565b604080516001600160a01b0390931683526020830191909152016100a2565b34801561012b57600080fd5b5061008e7f000000000000000000000000f4b658aaa084b8b76a5217450bb476ee97dd3a1b81565b34801561015f57600080fd5b5061008e7f00000000000000000000000089e5db8b5aa49aa85ac63f691524311aeb649eba81565b336001600160a01b037f000000000000000000000000f4b658aaa084b8b76a5217450bb476ee97dd3a1b16146101d05760405163618bbdd560e01b815260040160405180910390fd5b6000546001600160a01b0316156101fa576040516307a554d960e01b815260040160405180910390fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b600080546040516302d6e23f60e11b81526001600160a01b038581166004830152839233929116906305adc47e90602401602060405180830381865afa15801561026a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061028e9190611074565b6001600160a01b0316146102b55760405163084458e960e11b815260040160405180910390fd5b60007f00000000000000000000000089e5db8b5aa49aa85ac63f691524311aeb649eba6001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa158015610315573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103399190611074565b60405163e6a4390560e01b81526001600160a01b0387811660048301527f0000000000000000000000000bd7d308f8e1639fab988df18a8011f41eacad73811660248301529192509082169063e6a4390590604401602060405180830381865afa1580156103ab573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103cf9190611074565b92506001600160a01b038316610476576040516364e329cb60e11b81526001600160a01b0386811660048301527f0000000000000000000000000bd7d308f8e1639fab988df18a8011f41eacad738116602483015282169063c9c65396906044016020604051808303816000875af115801561044f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104739190611074565b92505b7f0000000000000000000000000bd7d308f8e1639fab988df18a8011f41eacad736001600160a01b031663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b1580156104d157600080fd5b505af11580156104e5573d6000803e3d6000fd5b50879350349250600091508190506104fc876107a5565b9150915081600014158061050f57508015155b1561052657610520878a8686610825565b90945092505b600080610535898c8888610bd5565b909250905061054e6001600160a01b038c168a84610c47565b60405163a9059cbb60e01b81526001600160a01b038a81166004830152602482018390527f0000000000000000000000000bd7d308f8e1639fab988df18a8011f41eacad73169063a9059cbb906044016020604051808303816000875af11580156105bd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105e19190611091565b506040516335313c2160e11b815261dead60048201526001600160a01b038a1690636a627842906024016020604051808303816000875af115801561062a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061064e91906110b3565b9750876000036106715760405163f564880560e01b815260040160405180910390fd5b600061067d83886110e2565b9050600061068b83886110e2565b905081156106a9576106a96001600160a01b038e1661dead84610c47565b80156107445760405163a9059cbb60e01b815261dead6004820152602481018290527f0000000000000000000000000bd7d308f8e1639fab988df18a8011f41eacad736001600160a01b03169063a9059cbb906044016020604051808303816000875af115801561071e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107429190611091565b505b60408051858152602081018590529081018b90526001600160a01b03808d1691908f16907f57aa04076c8e8e00f17b6f082eb7c65ec1aa90f07da036638ccfcb07dcae6cc89060600160405180910390a35050505050505050509250929050565b600080600080846001600160a01b0316630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa1580156107e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061080d9190611117565b506001600160701b0391821697911695509350505050565b6000806000806108358888610c85565b915091508160001480610846575080155b15610858578585935093505050610bcc565b6000876001600160a01b0316896001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa1580156108a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108c69190611074565b6001600160a01b031614905060006108f26108ed6108e586868c610d29565b896001610d29565b610ddf565b905082811115610a8b57600061090884836110e2565b9050878111156109155750865b6000610922828688610f38565b90508060000361093d57898997509750505050505050610bcc565b60405163a9059cbb60e01b81526001600160a01b038d81166004830152602482018490527f0000000000000000000000000bd7d308f8e1639fab988df18a8011f41eacad73169063a9059cbb906044016020604051808303816000875af11580156109ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109d09190611091565b508b6001600160a01b031663022c0d9f856109ec5760006109ee565b825b866109f957836109fc565b60005b6040516001600160e01b031960e085901b16815260048101929092526024820152306044820152608060648201526000608482015260a401600060405180830381600087803b158015610a4e57600080fd5b505af1158015610a62573d6000803e3d6000fd5b50505050808a610a729190611167565b610a7c838b6110e2565b97509750505050505050610bcc565b82811015610bc1576000610aa0858584610d29565b90506000858211610ab2576000610abc565b610abc86836110e2565b905089811115610ac95750885b6000610ad6828888610f38565b905080600003610af2578a8a9850985050505050505050610bcc565b610b066001600160a01b038d168e84610c47565b8c6001600160a01b031663022c0d9f86610b205782610b23565b60005b87610b2f576000610b31565b835b6040516001600160e01b031960e085901b16815260048101929092526024820152306044820152608060648201526000608482015260a401600060405180830381600087803b158015610b8357600080fd5b505af1158015610b97573d6000803e3d6000fd5b50505050818b610ba791906110e2565b610bb1828c611167565b9850985050505050505050610bcc565b878795509550505050505b94509492505050565b600080600080610be58888610c85565b915091508160001480610bf6575080155b15610c08578585935093505050610bcc565b6000610c15868484610d29565b9050868111610c2b579350849250610bcc915050565b86610c37888486610d29565b9450945050505094509492505050565b610c548383836001610f7d565b610c8057604051635274afe760e01b81526001600160a01b038416600482015260240160405180910390fd5b505050565b600080600080610c94866107a5565b91509150846001600160a01b0316866001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ce0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d049190611074565b6001600160a01b031614610d19578082610d1c565b81815b9350935050509250929050565b6000806000610d388686610fe3565b9150915081600003610d5d57838181610d5357610d5361117a565b0492505050610dd8565b818411610d7457610d746003851502601118611001565b6000848688096000868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010185841190960395909502919093039390930492909217029150505b9392505050565b600060018211610ded575090565b816001600160801b8210610e065760809190911c9060401b5b680100000000000000008210610e215760409190911c9060201b5b6401000000008210610e385760209190911c9060101b5b620100008210610e4d5760109190911c9060081b5b6101008210610e615760089190911c9060041b5b60108210610e745760049190911c9060021b5b60048210610e805760011b5b600302600190811c90818581610e9857610e9861117a565b048201901c90506001818581610eb057610eb061117a565b048201901c90506001818581610ec857610ec861117a565b048201901c90506001818581610ee057610ee061117a565b048201901c90506001818581610ef857610ef861117a565b048201901c90506001818581610f1057610f1061117a565b048201901c9050610f2f818581610f2957610f2961117a565b04821190565b90039392505050565b600080610f47856103e5611190565b905080610f56856103e8611190565b610f609190611167565b610f6a8483611190565b610f7491906111a7565b95945050505050565b60405163a9059cbb60e01b60008181526001600160a01b038616600452602485905291602083604481808b5af192506001600051148316610fd7578383151615610fca573d6000823e3d81fd5b6000873b113d1516831692505b60405250949350505050565b60008060001983850993909202808410938190039390930393915050565b634e487b71600052806020526024601cfd5b6001600160a01b038116811461102857600080fd5b50565b60006020828403121561103d57600080fd5b8135610dd881611013565b6000806040838503121561105b57600080fd5b823561106681611013565b946020939093013593505050565b60006020828403121561108657600080fd5b8151610dd881611013565b6000602082840312156110a357600080fd5b81518015158114610dd857600080fd5b6000602082840312156110c557600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b818103818111156110f5576110f56110cc565b92915050565b80516001600160701b038116811461111257600080fd5b919050565b60008060006060848603121561112c57600080fd5b611135846110fb565b9250611143602085016110fb565b9150604084015163ffffffff8116811461115c57600080fd5b809150509250925092565b808201808211156110f5576110f56110cc565b634e487b7160e01b600052601260045260246000fd5b80820281158282048414176110f5576110f56110cc565b6000826111c457634e487b7160e01b600052601260045260246000fd5b50049056fea264697066735822122084a371f7f36473124014d045fc6fa5961aab6dc819a2c76c8d0fbed3be5c0a8c64736f6c634300081c0033
| Token | Symbol | Balance | Price | Value |
|---|---|---|---|---|
| DIH | 1 | $0.0000102 | $0 |
| Txn Hash | Age | Event | Topics / Data |
|---|---|---|---|
| no event logs emitted by this address | |||
| Block | Age | Parent Transaction Hash | Type | Method | From | To | Value | |
|---|---|---|---|---|---|---|---|---|
| no internal transactions found for this address yet (traced blocks + on-demand) | ||||||||
| Transaction Hash | Method | Block | Age | From | To | Type | Item | ||
|---|---|---|---|---|---|---|---|---|---|
| no NFT transfers for this address yet | |||||||||
| Type | Age | Block | Details |
|---|---|---|---|
| no cross-chain L1↔L2 transactions for this address | |||
| Transaction Hash | Method ? | Block | Age | From | To | Amount | Txn Fee ? | ||
|---|---|---|---|---|---|---|---|---|---|
| 0xde7c7f…6cb1f1 | setRegistry | 10,806,923 | 32 days agoWed, 15 Jul 2026 23:57:08 UTC | 0xf4b6…3a1b | IN | DexMigrator | $0.000 ETH | 0.00000449 |
| Transaction Hash | Method | Block | Age | From | To | Amount | Token | ||
|---|---|---|---|---|---|---|---|---|---|
| 0xaf5bf926…cb6b44 | Transfer | 19,864,557 | 22 days agoSun, 26 Jul 2026 12:18:15 UTC | 0xcaf7…5d11 | IN | 0x10d6…288a | $0.001 DIH |