# imd/acc - Agent Spec imd/acc pays trading cashback as staked IMD (sIMD). A project calls Stacker.credit(trader, amount); the IMD goes into the sIMD vault in the trader's name and a Stacked(project, trader, imd, shares) event records it. The ProjectRegistry lists the projects whose credits earn points, decided by an IdentityMD oracle panel. Site: https://imdacc.fun Data API (JSON, every chain's cashback and points, about every 15 minutes): https://imdacc.fun/data/v1/index.json (format: https://github.com/khaed1/imd-acc/blob/main/docs/data-api.md) ## Ethereum mainnet (1) - Stacker: 0x06909f672301f28a810f78cfe7a754851269f4f0 (launch #1409; credit refuses the Stacker, the vault and the IMD token as trader) - ProjectRegistry: 0x7f53fa1543c682bb5de3f50c2cf3d1842ae57faa (launch #1495, panel rules version 3.1; a project that reports an owner() is applied for by that owner; fee 0.5 IMD, challenge bond 20 IMD, cooldown 7 days) - StackReceiver: 0x1999a54f573dac75ce8ef62a555dba418c9b3d10 (launch #1529; the Ethereum end of the multichain route: deposits cashback bridged from other chains into sIMD per trader) - IMD: 0xd34a99bc0f67ae1bbd63c660e6d0b0dd03e263b7 - sIMD: 0x9efa934d9fad4ae28c998a40195646b965a97247 ## Robinhood Chain (4663) - RemoteStacker: 0x4de07c2fa46d5d6ed9ceb3f38ec56d3461b3e898 (launch #1537; the same credit(trader, imdAmount); cashback waits per trader and anyone flushes up to 50 traders to the StackReceiver on Ethereum through IMD's LayerZero bridge for a tip of up to 2%; Queued(project, trader, recipient, imd) is the points record) - IMD: 0x5f7bb59365ce557c26dbcaa4ee9d39a4b95b7127 (the same OFT over IMD's bridge, 6 shared decimals) - Intake v2: 0xa43e6f75ee006411f79ac1c84120606c2330de82 - ProjectRegistry: 0x814da7f2469e3e37158ab7e031a31b3004d9bca1 (launch #1561, panel rules version 3.1, questions filed under chain 4663; the mainnet registry's code plus two audit fixes: listing blocks are read from the ArbSys precompile because block.number is Ethereum's height on Robinhood Chain, and claimBond refuses the registry itself; a project that reports an owner() is applied for by that owner; fee 0.5 IMD, challenge bond 20 IMD, cooldown 7 days, all in Robinhood Chain IMD). Credits from a listed project earn points from its listing block (the Queued events inside its listing periods); the site reads Robinhood Chain with the header network switch (Robinhood) and the data API publishes https://imdacc.fun/data/v1/robinhood.json - Listed on Robinhood Chain: imd/acc RemoteTrialVenue 0x81d17894b724dcb462bd5585be0792b1b32d19cc (the trial venue, 50 bps, from block 87,523,125) ## Addresses (Sepolia 11155111) - Stacker: 0x0457276d7b036818b3eddc1a4a3fceda61e9314d - ProjectRegistry: 0x30a3bb4d75989cb19f83607abc2dffe52a253384 (test run 6, launch #1463, panel rules version 3.1; a project that reports an owner() is applied for by that owner) - TestIMD: 0x2b69099e59b05901faa1dd164fabf098bf831e82 - TestSIMD (Vault): 0xf9e2eec3b610ec6781f7438ac5fb4bc049d81cc1 - Oracle Fee Token: 0x44a1cd38474fb1748400e7deb5f8d786cce3f89a - Intake v2: 0xa43e6f75ee006411f79ac1c84120606c2330de82 ## Integration Pattern ```solidity interface IStacker { function credit(address trader, uint256 imdAmount) external returns (uint256 shares); } // In your pool hook's afterSwap, with the real trader resolved (rule 2): uint256 cashback = imdSideAmount * RATE_BPS / 10_000; // 25-100 bps require(gasleft() >= 410_000, "imd/acc: insufficient gas"); // 350k covers the first-ever credit try stacker.credit{gas: 350_000}(trader, cashback) returns (uint256 shares) { // trader holds sIMD shares } catch { // Fallback: pay plain IMD so trades never revert IERC20(imd).transfer(trader, cashback); } ``` MUST rules: 1. Call credit from the trading contract itself, which holds the IMD and approved the Stacker. 2. Only inside a trade, for that trade's real trader: valid router hookData, else the router's msgSender(), else sender only if it has no code. Never tx.origin, never pay a router (in a Uniswap v4 hook sender is usually the router). 3. Rate must be between 25 and 100 bps (0.25% - 1%). 4. Always wrap in try/catch and pay plain IMD if it fails.