Machina Finance#
Overview#
Machina Finance is a decentralized exchange (DEX) design under development on Ergo. Its contract source and first public orders SDK are now open source, with the SDK published as a Fleet SDK plugin layer for building grid and limit order transactions. Its distinctive feature is grid order contracts, which are intended to let liquidity providers create configurable trading grids while traders can combine grid, limit, and market-style orders.
Recent updates#
May 9: the public Machina Finance orders SDK released0.1.0-alpha.0, adding token-to-token grid-order and ERG-to-token limit-order support.- The SDK README reports 100% test coverage and lists the supported contract wrappers for token-to-token grid orders, ERG-to-token grid orders, and ERG-to-token limit orders.
Jul 2: dev updates said final grid-contract optimizations had been added and limit-order contracts were in progress.Jan 21: theGridOrderSDK / Fleet plugin module was complete with 100% test coverage, whileLimitOrderwork was still progressing.Jan 28: a critical input-aggregation bug was fixed and theE2Tlimit contract was finished and ready for review.Mar 4: all SDK actions were implemented and the contracts moved into audit.
Goal#
The primary objective of Machina Finance is to promote decentralization and facilitate P2P trade. By leveraging the power of blockchain technology and smart contracts, Machina Finance aims to create a DEX that is secure, transparent, and user-friendly.
Developer Surface#
- Contracts are public in the original Machina Finance repository.
- Orders SDK provides
GridOrderandLimitOrderhelpers for Fleet SDK transaction builders. - SDK actions cover order creation, fills, and closing order boxes.
Features#
Grid Order Contracts#
Grid order contracts are a novel feature in the world of DEXs. They allow for a more efficient and effective trading experience by replacing the need for liquidity pools. This feature is currently under development and is expected to bring significant changes to the way DEXs operate.
Contract Model#
The current contract specification defines:
- Origin Attestation Tokens (OATs) to identify boxes issued by the MachinaFi protocol.
- Pair Identifier Tokens (PITs) to link a pair's settings and execution boxes.
- Execution boxes that check trade execution, protocol fees, executor fees, and miner-fee limits.
- Settings boxes that hold base/quote asset IDs, maker/taker fee percentages, and per-order fee parameters.
- Order contracts for grid, limit, and market-style orders with creator refunds, partial fills where applicable, and context-variable checks for safer batched execution.