Address
0xedfa005a97ad28df0caf7ee3cdbc8adb347d8eedCurrent Holdings
$0.00
TXs sent
not counted
First Active
2026-06-15
block 26,788,590
Last Active
91 days ago
block 26,811,618
Funded By
not identified
Net worth historyi
No net-worth snapshots recorded yet
exact matchSharkMatrixV2solc 0.8.34+commit.80d5c536runtime exact · creation exact
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;
// --- STANDARD ERC20 INTERFACE ---
interface IERC20 {
function transfer(address recipient, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
function approve(address spender, uint256 amount) external returns (bool);
function balanceOf(address account) external view returns (uint256);
}
// --- STANDARD DEX ROUTER INTERFACE (PulseX / Piteas) ---
interface IDexRouter {
function swapExactTokensForTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external returns (uint[] memory amounts);
}
contract SharkMatrixV2 {
address public immutable owner;
// Security Gate: Only you (and your Python script) can trigger this contract
modifier onlyOwner() {
require(msg.sender == owner, "Access Denied: Not the Shark Owner");
_;
}
constructor() {
owner = msg.sender;
}
/**
* @dev The Pull-From-Wallet Execution Loop.
*/
function executeAtomicSweep(
address routerAlpha,
address routerBeta,
address baseToken,
address targetToken,
uint256 tradeSize,
uint256 minProfit
) external onlyOwner {
// 1. THE PULL: Bring the baseToken (USDC) from your wallet into the contract
// Note: Your wallet must grant an "Allowance" to this contract first!
require(IERC20(baseToken).transferFrom(msg.sender, address(this), tradeSize), "Wallet pull failed. Check allowance.");
// 2. Setup the routing paths
address[] memory pathBuy = new address[](2);
pathBuy[0] = baseToken;
pathBuy[1] = targetToken;
address[] memory pathSell = new address[](2);
pathSell[0] = targetToken;
pathSell[1] = baseToken;
// 3. EXECUTE LEG 1: Buy Target Token on Exchange Alpha
IERC20(baseToken).approve(routerAlpha, tradeSize);
IDexRouter(routerAlpha).swapExactTokensForTokens(
tradeSize,
0, // Slippage handled in the final safety gate
pathBuy,
address(this),
block.timestamp
);
// 4. Calculate how much Target Token we just received
uint256 targetAcquired = IERC20(targetToken).balanceOf(address(this));
// 5. EXECUTE LEG 2: Sell Target Token on Exchange Beta
IERC20(targetToken).approve(routerBeta, targetAcquired);
IDexRouter(routerBeta).swapExactTokensForTokens(
targetAcquired,
0,
pathSell,
address(this),
block.timestamp
);
// 6. THE HARDENED SAFETY GATE: Measure the final yield
uint256 endingBalance = IERC20(baseToken).balanceOf(address(this));
// If the ending balance isn't greater than the starting size + minProfit, REVERT the block.
// This instantly undoes the entire transaction (including the initial pull from your wallet).
require(endingBalance >= tradeSize + minProfit, "Critical: Yield did not breach minimum profit! Reverting.");
// 7. THE RETURN: Send the original capital + all profit directly back to your wallet
require(IERC20(baseToken).transfer(msg.sender, endingBalance), "Failed to return funds to wallet.");
}
// --- EMERGENCY FAIL-SAFE ---
// Extracts any fractional "dust" left behind by routers
function emergencyWithdraw(address token) external onlyOwner {
uint256 balance = IERC20(token).balanceOf(address(this));
if (balance > 0) {
IERC20(token).transfer(owner, balance);
}
}
}