The low-level implementation of the Replicating Market Maker, "RMM-01", is in the
PrimitiveEngine.sol smart contract. It is designed to be minimal and gas efficient, only implementing the fundamental functions of an AMM: provide liquidity, remove liquidity, and swap between the pool's tokens.
This Engine has an extra feature to carry an internal token balance, which will save gas by reducing token transfers; token transfers are usually a considerable portion of the gas expense.
There are no currently deployed contracts on production networks as of December 28, 2021.
|PrimitiveFactory||Rinkeby (chainId 4)||Beta.3|
|PrimitiveManager||Rinkeby (chainId 4)||Beta.3|
|Updates a pool's last timestamp, effectively applying the time that has passed.|
|Creates a pool, "curve", with the arguments as parameters.|
|Increases the recipient's internal token balance.|
|Decreases the msg.sender internal token balance.|
|Increases the liquidity position of the recipient by providing tokens to the pool.|
|Decreases the liquidity of msg.sender by removing tokens from the pool.|
|Swaps between the pool's tokens, either from the risky to the stable token or from the stable to the risky token.|