skills/vulnerability-patterns/inadherence-to-standards/SKILL.md
- Contract claims to implement a standard (ERC20, ERC721, ERC1155, etc.) but deviates from the specification
npx skillsauth add apegurus/solidity-argus inadherence-to-standardsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
// Non-compliant ERC20: missing return value on transfer
// (matches USDT, BNB behavior — breaks callers that check return)
function transfer(address to, uint256 amount) external {
balances[msg.sender] -= amount;
balances[to] += amount;
// Missing: return true;
// Missing: emit Transfer(msg.sender, to, amount);
}
// Caller assumes strict compliance — breaks on non-compliant tokens
function depositToken(IERC20 token, uint256 amount) external {
// Reverts on tokens that don't return bool (USDT)
require(token.transfer(address(this), amount), "transfer failed");
deposits[msg.sender] += amount;
// Bug: doesn't account for fee-on-transfer tokens
// Actual received amount may be less than `amount`
}
transfer returns bool and emits Transfer)SafeERC20 is used for transfer/transferFrom/approve calls — raw IERC20 calls break on non-compliant tokenssafeTransfer/safeTransferFrom wrappersSafeERC20 from OpenZeppelin is used, which handles missing return valuesSafeERC20 for all token interactionsimport {SafeERC20, IERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
using SafeERC20 for IERC20;
function depositToken(IERC20 token, uint256 amount) external {
uint256 balBefore = token.balanceOf(address(this));
token.safeTransferFrom(msg.sender, address(this), amount);
uint256 received = token.balanceOf(address(this)) - balBefore;
deposits[msg.sender] += received;
}
testing
Specialist profile for mechanically applying the attack-vector deck and classifying vectors as skip, drop, or investigate.
tools
Specialist profile for libraries, helpers, base contracts, adapters, encoders, wrappers, and integration glue.
testing
Specialist profile for rounding, scale, decimal, downcast, and arithmetic accounting edge cases.
testing
Specialist profile for extracting conservation laws and state couplings, then searching for violating paths.