skills/makina-contracts/SKILL.md
Makina smart contract interfaces and ABIs. Use when working with Makina protocol - understanding Machine, Caliber, Registry interfaces, function signatures, structs, events, deposit/redeem flows, or cross-chain bridge operations.
npx skillsauth add makinahq/makina-agents makina-contractsInstall 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.
Interface ABIs and documentation for interacting with Makina smart contracts - a cross-chain investment strategy protocol.
Makina is a cross-chain DeFi protocol enabling coordinated investment strategies across Hub and Spoke blockchains:
Hub Chain (Ethereum) Spoke Chains (Arbitrum, Base)
┌─────────────────────────────┐ ┌─────────────────────────────┐
│ Machine │ │ CaliberMailbox │
│ ├── HubCaliber │◄────►│ └── SpokeCaliber │
│ ├── MachineShare (ERC20) │ │ │
│ └── PreDepositVault │ │ Bridge Adapters │
│ │ │ ├── Across V3 │
│ Periphery │ │ └── LayerZero V2 │
│ ├── DirectDepositor │ └─────────────────────────────┘
│ ├── AsyncRedeemer │
│ ├── SecurityModule │
│ └── WatermarkFeeManager │
└─────────────────────────────┘
| Category | Reference | Description |
|----------|-----------|-------------|
| Machine & Caliber | references/core-machine.md | Main vault and strategy execution |
| Registries | references/core-registries.md | Token, Oracle, Chain registries |
| Factories | references/core-factories.md | Contract deployment |
| Bridge | references/core-bridge.md | Cross-chain adapters |
| Swap & Utils | references/core-swap-utils.md | Swap modules, utilities |
| Category | Reference | Description |
|----------|-----------|-------------|
| Deposit & Redeem | references/periphery-deposit-redeem.md | User flows |
| Security Module | references/periphery-security.md | Slashing, cooldowns |
| Fee Management | references/periphery-fees.md | Fee calculation |
| Oracles | references/periphery-oracles.md | Share price oracles |
| Registry & Factory | references/periphery-registry-factory.md | Periphery infra |
Makina uses specific terminology for governance roles:
| Role | Function | Description |
|------|----------|-------------|
| Mechanic | mechanic() | The operator/admin who manages day-to-day operations (execute strategies, manage positions). This is the "operator" in Makina terminology. |
| Risk Manager | riskManager() | Sets risk parameters and thresholds |
| Security Council | securityCouncil() | Emergency actions, can enable recovery mode |
| Authority | authority() | Access control contract for role-based permissions |
| Accounting Agent | isAccountingAgent(addr) | Permissioned addresses that can perform accounting operations when restricted accounting mode is enabled |
When restrictedAccountingMode() is true, only designated Accounting Agents can call accounting functions. Use isAccountingAuthorized(addr) to check if an address can perform accounting.
// Check if user can perform accounting
bool canAccount = IMakinaGovernable(machine).isAccountingAuthorized(user);
// Add/remove accounting agents (security council only)
IMakinaGovernable(machine).addAccountingAgent(agent);
IMakinaGovernable(machine).removeAccountingAgent(agent);
The Machine enforces a maximum share price change rate to protect against manipulation:
// View max allowed change rate (1e18 = 100% per second)
uint256 maxRate = IMachine(machine).maxSharePriceChangeRate();
// Set new rate (risk manager only)
IMachine(machine).setMaxSharePriceChangeRate(newRate);
// Deposit
IDirectDepositor(depositor).deposit(assets, receiver, minShares, referralKey);
// Redeem (async)
uint256 requestId = IAsyncRedeemer(redeemer).requestRedeem(shares, receiver, minAssets);
IAsyncRedeemer(redeemer).finalizeRequests(upToRequestId, minAssets);
IAsyncRedeemer(redeemer).claimAssets(requestId);
// Read share price
uint256 price = IMachineShareOracle(oracle).getSharePrice();
uint256 assets = IMachine(machine).convertToAssets(1e18);
// Lock in Security Module
uint256 shares = ISecurityModule(sm).lock(assets, receiver, minShares);
Useful when making raw JSON-RPC calls or encoding calldata.
mechanic() 0xc549beec
riskManager() 0x47842663
securityCouncil() 0x27eb6c0f
authority() 0xbf7e214f
recoveryMode() 0x07a00b1f
restrictedAccountingMode() 0x8a6e2b7c
isAccountingAgent(address) 0x5c975abb
isAccountingAuthorized(address) 0x9b3ba79f
depositor() 0xc7c4ff46
redeemer() 0x2ba29d38
shareToken() 0x6c9fa59e
accountingToken() 0xda68cf8b
hubCaliber() 0x34a41188
feeManager() 0xd0fb0203
lastTotalAum() 0x74c59381
shareLimit() 0x3be75aa3
maxSharePriceChangeRate() 0x1a2e9b4d
convertToShares(uint256) 0xc6e6f592
convertToAssets(uint256) 0x07a2d13a
getDetailedAum() 0xd98964f1
getPositionsLength() 0x740c0c44
isBaseToken(address) 0x85bb6a3c
allowedInstrRoot() 0x27f99dfe
isInstrRootGuardian(address) 0x6e8a9c3f
pendingAllowedInstrRoot() 0x4b5d7a2e
This documentation is current as of:
ff6f036) - January 26, 2025e73532b) - January 26, 2025testing
Test Machine contract addresses from makina-test-integrations repo. Use when you need addresses for deployed test Machines (tstUSDC1-5, tstETH1), their Calibers, or accounting tokens. Can fetch latest addresses from GitHub.
tools
Operate the `spellcaster` binary for Makina machine and caliber workflows in non-interactive mode, including balances, positions, swaps, bridge actions, and maintenance commands. Use this skill whenever the user asks to run or debug `spellcaster` terminal commands (as an installed binary), compose command flags, configure `~/.config/spellcaster/config.toml`, or fix CLI errors related to `--machine`, `--caliber`, signer mode, `--dev`, Safe, and RPC settings.
development
MakinaLite smart contract interfaces and ABIs. Use when working with MakinaLite - understanding MakinaLiteModule, Safe-module integration, Weiroll instructions, swap/bridge/flash-loan components, OracleRegistry, bridge encoders (Across V4, CCTP V2, LayerZero V2), or the MakinaLiteRegistry/ModuleFactory infra.
tools
Foundry Cast CLI reference for EVM interactions. Use when encoding/decoding ABI data, querying blockchain state (balances, blocks, transactions), sending transactions, ENS lookups, data conversions (hex, wei, bytes32), or wallet management.