- Bump context addresses to v1.3.6-0 and deployments to v2.2.4-6
- Bump context addresses to v1.3.5
- update gasreq for simple limit orders
- Add option to disable unknown offer id.
- Change gas estimation for kandel populate transaction.
- Add 20% to gas limit from the gas estimation
- Add mumbai addresses.
- Add Pac finance logic
- Bump deployments version
- Add Smart Kandel for retrieval
- Add Smart kandels to SDK
- Changed
onAave
params totype
params - Added monoswap and thruster routing logics
- Move
Transaction
type fromMarket
toutil/transactions
. Also, use this type inMangroveAmplifier
instead of the duplicated type in that file. - Fix amplifier gas requirements and provision calculations
- Upgrade to mangrove-strats v2.1.0-4 (includes deployed Blast contract versions)
- Upgrade to mangrove-deployments v2.2.3
- fixes to Blast deployment information
- fixes
KandelSeeder
v2.0.1-0 address on Polygon Mumbai
- Return both transaction (
ethers.ContractTransaction
) and result promises fromMangroveAmplifier
methods.
- add tx receipt in
MangroveAmplifier.addbunddle
- add tx receipt in amplified orders methods
- fix gasreq for zerolend again
- increase gasreq for aave and zero lend
- Fix zerolend gasreq
- Add Zero lend logic
- fix: add nonce manager
- Reduce gasReq for blast orders
- Add WPUNKS to tokens.json
- Upgrade to context-addresses v1.3.4 (includes Blast mainnet Meta stree wrapper addresses address)
- Upgrade to mangrove-deployments v2.2.1-5 (Added orbit mainnet)
- Bump: reliable-event-subscriber v1.1.30
- Upgrade to mangrove-deployments v2.2.1-2 (Fixes issue with blast points)
- Upgrade to mangrove-deployments v2.2.1-0 (Fixes issue with Kandel on Blast)
- Upgrade to mangrove-deployments v2.2.1-0 (includes Blast Kandel on mainnet)
- Upgrade to context-addresses v1.3.3 (includes Blast mainnet Multicall2 address)
- Upgrade to context-addresses v1.3.2 (includes Blast mainnet addresses)
- Upgrade to mangrove-core v2.1.1 (includes Blast support)
- Upgrade to mangrove-strats v2.1.0-3 (includes Blast support)
- Upgrade to mangrove-deployments v2.2.0 (includes Blast deployments and OrbitLogic support)
- Fix cashness for blast tokens
- Add orbit logic to mangrove js
- Bump
mangrove-deployments
version
- fix: bump mangrove-deployments to fix KandelLib
- Remove amplifier as param to class
MangroveAmplifier
- fix:
Density.getMaximumGasForRawOutbound
can now handle density = 0
- Add mangrove amplifier as export on
index.ts
- Add defaults for
minimum{Base,Quote}PerOfferFactor
in the Kandel configuration - Add initial configuration for Blast and Blast Sepolia. For now, they use the defaults, so have only be added to make it easy to find and modify later if needed.
- fix: Handle missing case where AaveKandel was assumed available
- Upgrade to mangrove-deployments v2.1.1
- Upgrade to context-addresses v1.2.0
- Use network names from context-addresses instead of ethers.js
- Make AaveKandel optional: If the
AaveKandelSeeder
address is not available on a network, Aave Kandel will not be available.
- fix: Make SimpleAaveLogic optional: If the address is not available on a network, the logic will not be available.
- Upgrade to context-addresses v1.1.4 (includes Blast Sepolia Multicall2 address)
- fix: Blast sepolia network name resolving to unknown
- Upgrade to mangrove-core v2.1.0-0 (includes Blast support)
- Upgrade to mangrove-strats v2.1.0-0 (includes Blast support)
- Upgrade to mangrove-deployments v2.0.3-4 (includes latest Mumbai and Blast deployments)
- Upgrade to context-addresses v1.1.3 (includes Blast tokens WBTC, WETH, and USDB)
- Consider deployments of mangrove-core >=2.0.0 <2.2.0 and mangrove-strats >2.0.0 <2.2.0 contracts compatible (including pre-releases)
- Upgrade to mangrove-strats v2.0.1-0
- feat: Add
MangroveAmplifier
to support working with amplified orders on mangrove - Upgrade to context-addresses v1.1.1
- Upgrade to mangrove-deployments v2.0.2-0
- Simplify loading of context addressing
- feat: Add function to read all configured contract addresses for all networks
configuration.addresses.getAllAddressesForAllNetworks()
- feat: Allow add chunk to contains offer without its dual
- feat: Allow for non symmetrical Kandel distribution
- feat: Rename
Market.close()
toMarket.disconnect()
to more clearly signal that it's dual toMarket.connect()
and does not close the market on Mangrove. - Upgrade or remove
examples/how-tos
so they match the new version of the Mangrove core protocol and SDK
- feat: Add
Mangrove.getRestingOrderRouterAddress
which gets the address of the router contract for resting orders belonging to the connected user (Mangrove.signer
). - Upgrade to mangrove-deployments v2.0.1-2
- Upgrade to mangrove-deployments v2.0.1-1
- Upgrade to mangrove-deployments v2.0.1-0
- Upgrade to mangrove strats v2.0.0-b1.2
- Upgrade
examples/tutorials/on-the-fly-offer.js
to new Mangrove core protocol and SDK - fix: Coerce ticks to tickSpacing when given as arguments
- feat: Add integration test of tickSpacing>1
- feat!:
configuration.tokensConfiguration.getDecimals
now returnsundefined
instead of throwing if the token decimals are not in the configuration
- Upgrade to @mangrovedao/mangrove-deployments v2.0.0
- feat: Updated CI to check
CHANGELOG.md
is updated with each PR - fix: Able to handle backticks in changelog when releasing.
- fix: Fix various issues in TypeDoc comments wrt @see vs @link.
- feat: Updated exports in index.ts to export all referenced types.
- fix: Fixed various issues in TypeDoc comments.
- feat: Moved MangroveJsDeploy from mangrove-strats to this package. Renamed script to EmptyChainDeployer
- fix: rounding when deducing tick from price for LiquidityProvider
- feat: Add spread to market
- feat: Add getBest to semibook
- Cross-cutting
- Update licenses: All code is now licensed under the MIT License.
- feat!: Use the new Mangrove core protocol and strats from the new @mangrovedao/mangrove-core and @mangrovedao/mangrove-strats packages. See their changelogs for details.
- feat!: Make consequential changes to APIs to match those changes (not all changes mentioned)
- feat: Read addresses from @mangrovedao/mangrove-deployments and @mangrovedao/mangrove-context-addresses
- feat!: Round prices/ticks/volumes etc. according to maker or taker scenario due to precision of tick based core.
- Core
- feat!: Introduce Density class to wrapping floating point density from core protocol.
- feat!: Remove pivotId since it is no longer needed.
- Allowance
- fix: increaseAllowance will not fail if allowance becomes larger than 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff.
- fix: increaseAllowance will consider large values infinite like other approval functions.
- fix: all token approval functions now cap the allowance to 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff.
- fix!: rename offer_gasbase on offer structures to gasbase
- feat: The market order simulation used to estimate volumes and gas has been updated to match Mangrove v2's market order logic.
- feat!: The 'maxOffers' option in 'CacheContentOptions' has been replaced with a new option: 'targetNumberOfTicks'. When loading from chain, the cache will load until at least this number of ticks is in the cache. The default is 'Semibook.DEFAULT_TARGET_NUMBER_OF_TICKS'.
- feat!: A new default value 'Semibook.DEFAULT_CHUNK_SIZE' has been introduced for 'CacheContentOptions.chunkSize'.
- feat!: Mangrove and Semibook configs are now cached on 'connect' and (for Semibook) updated by events. The methods to read configs are no longer async and naming has been made consistent: 'Mangrove.config()', 'Market.config()', and 'Semibook.config()'.
- feat!: 'Market.estimateVolume' now also estimates fees and returns it in a new 'estimatedFee' field. The existing 'estimatedVolume' field is exclusive of fees and thus represents the true amount the taker can expect to receive/pay.
- feat!: 'Mangrove.openMarkets' no longer connects to all markets, but returns a list of 'Market.Key's, optionally with the relevant offer list configuration attached to each. This is identical to the previous 'Mangrove.openMarketsData' which has been removed.
- feat!: 'MgvToken' has been renamed to 'Token'.
- feat!: 'Mangrove.toUnits|fromUnits' no longer accepts a token name/symbol as this was ambiguous. Instead, use 'Token.createToken' and call 'toUnits|fromUnits' on that.
- feat!: Token 'name' was misused: Sometimes it was assumed to be a symbol and sometimes an ID. It has therefore been replaced by 'id' and 'symbol' in all relevant places. Configuration files have been converted to use the token instance ID's from the context-addresses package to avoid ambiguity among (1) different tokens with the same symbol and (2) multiple token instances such as 'USDC' (Circle issued) and 'USDC.e' (bridged from Ethereum).
- Default token IDs can be registered for a symbol and network. And if there is only one ID for a given symbol on a network, it will be considered the default. 'Mangrove.token()' will create an instance of the default token ID if found.
- MangroveOrder
- feat: Add 'Market.updateRestingOrder' function which allows updating resting orders posted by 'MangroveOrder'
- feat: Add 'Market.retractRestingOrder' function for retracting resting orders posted by 'MangroveOrder'.
- feat: Calculate default offer provision for MangroveOrder based on a gasprice factor if provision is not provided.
- feat: Allow 'offerId' to be passed in to re-use an existing offer.
- Kandel
- feat!: Introduce GeometricKandel classes
- feat!: Introduce 'populateGeometricDistribution' to populate geometric distribution respectively using reduced call data.
- feat!: Introduce 'populateGeneralDistribution' to populate arbitrary non-geometric distribution.
- feat!: Allow distribution parameters to be either price- or tick-based.
- bump: mangrove-core to v1.5.13
- fix: mumbai config
- bump: mangrove-core to v1.5.11
- fix: catch error in Semibook initialization
- fix: missing multicall2 address for abitrum network
- Bump: mangrove-core to v1.5.10
- fix: infiniteApproval checks for larger than 2^200, instead of 2^256
- fix: Restore ability to enableLogging in a browser-context (shimmed via esbuild)
- fix: Disable esbuild minification of identifiers
- fix: do not call getLastBlock if reliable provider does not listen to events
- fix: semibook subscribe only if we listen to events
- feat: add an option to disable events listenning
- Same as 1.4.18.
- Bump: reliable-event-subscriber to v1.1.29
- fix: Use new mgvConfig for mangrove-core and mangrove-strats
- Add: mangrove-strats v0.0.2-0
- Bump: mangrove-core to v1.5.8-1
- feat: mgvtoken add tokenFromAddress function
- feat:
LiquidityProvider
getter from anOfferLogic
instance.
- Bump: mangrove-core to v1.5.7
- Bump: reliable-event-subscriber to v1.1.28
- add fetchDecimals with address
- make addresses configuration public
- Bump: reliable-event-subscriber to v1.1.27
- Bump: reliable-event-subscriber to v1.1.26
- Bump: reliable-event-subscriber to v1.1.27
- Bump: reliable-event-subscriber to v1.1.25
- fix: wrong pivot when posting limit orders far from the mid price.
- Bump: reliable-event-subscriber to v1.1.24
- Bump: reliable-event-subscriber to v1.1.23
- fix mangrove-core version not correctly updated
- Bump mangrove-core to v1.5.6
- Bump mangrove-core to v1.5.5
- Bump reliable-event-subscriber to v1.1.22
- Bump reliable-event-subscriber to v1.1.21
- Fix broken
deal
functionality for tests.
- Fix
[object]
being pretty printed when callingconsoleAks/Bids
. - Renamed
constants.ts
toconfiguration.ts
and encapsulated all configuration there - Configuration can now be extended and/or changed via the
Mangrove.updateConfiguration(partialConfiguration)
method. The providedpartialConfiguration
will be merged into the existing configuration, overriding any configuration that occurs in both. See theConfiguration
type for the structure of the configuration. - Token decimals handling and API have been improved:
Mangrove.token(.)
is now async and will fetch decimals from chain if they are not in the configuration. This makes it more robust with respect to tokens that are not included in the configuration of mangrove.js. The old sync behaviour that relied only on the configuration (and failed if the decimals were unknown) is still available inMangrove.tokenFromConfig(.)
.MgvToken.getDecimals(.)
etc. will now returnundefined
if the decimals are not in the configuration instead of throwing anError
. The old behaviour is still available in the newMgvToken.getDecimalsOrFail(.)
.MgvToken.getOrFetchDecimals(.)
will first look for decimals in the configuration and then, if they are not found, fetch them from chain.
- Add missing dependency on object-inspect
- Fix issue in test utils
- Change mangrove-ts to a single package repo for mangrove.js.
- Make gas estimation explicit to allow usage of ethers estimation.
- Increase gas estimation, to account for 64/63 reserved in posthook
- MgvToken add approveIfNotInfinite and allowanceInfinite
- Increase gas estimation for limit orders due to overhead of going through MangroveOrder contract.
- Add token decimal configurations for WBTC, WMATIC, and USDT
- Bump mangrove-core to 1.5.4
- Remove redundant addresses
- Bump mangrove-core to 1.5.3
- Use array to handle market subscription
- Fix: gas estimates for market orders is boosted to avoid
NotEnoughGasForMaker
type of tx failures. - Max gas limit for market orders is set to 10,000,000
- commonlib.js dependency removed
- Bump RES to v1.1.19
- Expose deal logic for any token on an Anvil chain
- Expose forge script functionality, to run forge script
- Add back env vars temporarily
- Safety release to supersede prerelease erroneously released
- Bump mangrove-core to 1.5.1-1
- OfferLogic has an
approve
function to ask the underlying logic to approve signer (or an arbitrary address) to spend a specific token on its behalf. - Liquidity provider no longer provides
approveAsk
,approveBids
which were making too much asumptions on router usage. - Adapts tutorial scripts accordingly.
- bugfix: token approval could not be set to 0
- Update reliable-event-subscriber to fix rpc bug with go-ethereum
- Fix broken commonlib.js dependency
- reliable-event-subscriber: update to v1.1.4 (reduce rpc usage, prevent rate limiting)
- logging: Reduce noise during tests
- KandelStatus: Add min and max price
- KandelInstance: Add calculateUniformDistributionFromMinPrice to heal all dead offers
- KandelInstance: Add getMinimumVolumeForIndex to heal a single offer
- temporarily remove check for rpc provider
- fixed issue with reliable-event-subscriber integration when using metamask through wagmi
- fixed issue with reliable-event-subscriber integration when using metamask
- added approveIfHigher, approve, increaseApprove for more fine-grained approval control
- added functions for increasing and decreasing volumes of Kandel distributions
- use @mangrovedao/reliable-event-subscriber for keeping semibook up to date and resilient to block reorgs
- removed ability to control compounding for Kandel - always full compounding.
- updated Kandel configuration for mumbai
- added recommended configuration retrieval for the Kandel strategy
- added calculation of provision, withdrawal, access to offer logic to kandel sdk
- use next prerelease mangrove-core
- Draft version of Kandel SDK
- Use prerelease mangrove-core
- adapt to abi changes in the new mangrove-core
- Use no_env_vars profile
- Use prerelease mangrove-core
- adapt to abi changes in the new mangrove-core
- Add permit features
- Correctly read addresses from mangrove-core
mgv deal
to deal arbitrary tokens (WIP)- Reverse lookup name from address
- mgvToken approval accepts Big
- Use AAVE faucet addresses on mumbai network
- skipped
- Remove inefficient synchronous block-by-block querying and updates of
Semibook
's. Instead process events one-by-one (optimized for WebSocket subscriptions). Block-subscription have been removed fromSemibook
andMarket
. Code relying on block-by-block processing (mostly test and test-util libs) have been rewritten. APIs inMarket
andSemibook
supporting on-block listening have been removed.
- Improve and bugfix devNode detection (which made
Mangrove.connect()
buggy against local chains in previous version), and add options for Multicall and ToyENS usage.
- add Mangrove.openMarkets and Mangrove.openMarketsData, reads open markets info off MgvReader
- Updated order to return both transaction response and result
- Add option to TradeParams, that forces usage of MangroveOrder
- Moved ExpiryDate from RestingOrderParams to TradeParams
- Upgraded mangrove-core dependency with new addresses
- Bump version to 1.0.0 for initial release
- Upgraded mangrove-core dependency to enable Polygon mainnet
- Updated TradeParams to remove slippage
- public fields of Mangrove class are no longer prefixed by '_'
- Simplifying
offerLogic
andliquidityProvider
classes. They now respectively implementIOfferLogic
andILiquidityProvider
interface
- Add name resolution via the ToyENS contract from mangrove-core if it exists at the canonical address. This enables using named contracts in mangrove.js when running a local chain. This also works if those contracts are deployed after mangrove.js has been initialized as long as the deployer registers the address in ToyENS, which all mangrove-core deployment scripts do.
- Add
Watcher
proxy class to ease observation of async updates - Smaller code documentation improvements
- Upgraded mangrove-core dependency.
- For resting orders timeToLiveForRestingOrder is changed to expiryDate and is in Unix time.
- For TradeParams changed to have restingOrder be a boolean on a mangroveOrder parameter.
- MangroveOrder now supports fill-or-kill orders.
- Fix
Semibook.simulateMarketOrder
. FixesSemibook.estimateVolume
,Market.(estimateVolume[|ToReceive|ToSpend])
. - EOA offers (on the fly) do not require any gasreq
- Remove unsafe option to set
price=null
inmarket.{buy|sell}
as simulating true market orders is prone to sandwich attacks and therefore not encouraged.
- Fix addresses being stored in checksum format
- Move @mangrovedao/mangrove-core from devDependency to dependency.
- Export typechain namespace
- Rename
penalty
tobounty
inMarket.Summary
as it's a bounty from the taker's perspective - Fix comparison of addresses which caused missing summaries for some tokens. Addresses are now handled as checksum addresses.
- Fixed decimals handling for resting order in results.
- Resting order no longer expect
gasForMarketOrder
andretryNumber
- new deploy address for
MangroveOrder
- changing scheme for retrieving resting order id (listening to MangroveOrder logs).
- bugfix: wrong deployment addresses
- Update and verify
MangroveOrderEnriched
ApproveMangrove
andApproveRouter
are no longer functions ofOfferLogic
andLiquidityProvider
useactivate
instead.OfferLogic
has anapproveToken
function to let EOA approve router or logic itself if the logic has no router- update ABIs
- Update address for
MangroveOrderEnriched
- Update commonlib.js dependency
- Bug fix: Remove node dependencies from browser bundle
- mgv.token can specify address/(displayed)decimals
- Remove all hardhat dependencies
- mgv can host a local node, see
mgv node --help
- Add parameter to
snipe
to force failing on successful orders (using MgvCleaner contract)
- Add ability in
market.ts
to snipe a list of targets - Testing: Refactor to greatly improve ability to unit test, and add a considerable amount of tests
- Generalize volume estimations to better match mangrove's contract core
- Bump version of a number of dependencies
- Update out-of-date ABIs
- several bugfixes
- [strats] Providing an 'activate' function to enable strat admin to set required allowances in a single transaction
- Providing access to
activate
in the API (OfferLogic
class) - new class (to be improved) 'aaveV3Module' to cast a contract address into an ethers.js contract with the ABI of 'AaveV3Module.sol'
- [major update] adding
enableRouting
function onliquidityProvider
class to approve router to route liquidity on current market. cancelOffer/Bid/Ask
is now calledretractOffer/Bid/Ask
to match Mangrove's naming scheme- Remove deprecated and defunct
printOrderBook.ts
script which has been superseded by themgv print
commmand - bump commonlib.js to 0.0.4 as commonlib.js@0.0.2 was broken
- Update ABI's and addresses for
MangroveOrder
andMangroveOrderEnriched
- Bug fix: Deploy maker contract with the simple maker abi requires an additional argument.
- New deployment of
MangroveOrder
contract with the Mangrove address added to relevant events
- new deployment of
MangroveOrder
contract
- (breaks backwards comp)
buy
andsell
function inMarket.ts
class now returns additional information for market order introspection.
- Resting Limit Orders now post residual a the taker price before slippage
- update with latest Mumbai address for
MangroveOrderEnriched
with the above feature
- Update with latest Mumbai address for
MangroveOrderEnriched
(formerly known asMangroveOrder
), which uses the latest Mangrove.
approveMangrove
onOfferLogic
instance may use an optional value{amount:value}
. Note it is now a signed transaction that must be emitted by the admin of the underlying logic.- Remove instance aliases for stateful static methods in
Mangrove
as the scope of these was misleading: setting a value on one instance would affect all others. The removed methods are:{get,set}Decimals
,{get,set}DisplayedDecimals
, andfetchDecimals
. - Disable logging by default. It can be turned on by calling
enableLogging()
inutil/logger
. This is a temporary workaround to prevent unwanted logging to the console until issue #220 is fixed. market.subscribe
now returns a user friendlymgvData
in the case ofOfferFail
.
- Update with latest Mumbai address for
MangroveOrder
which uses the latest Mangrove.
- Add support for resting limit orders using
MangroveOrder
contract.
- Update addresses (really this time) to newly deployed Mangrove core contracts (they now match the mangrove.js ABI files)
- Update addresses to newly deployed Mangrove core contracts (they now match the mangrove.js ABI files)
- Fix
Mangrove.getDisplayedPriceDecimals
: It was mistakenly using the configuration forMangrove.getDisplayedDecimals
instead of its own configuration.
- Add support for WebSocket URL's in
Mangrove.connect
- Added two separate features for displaying prices with appropriate numbers of decimals:
Mangrove.{get|set}DisplayedPriceDecimals
gets/set the number of decimals to display for a given token when displayed as a price (the default is 6)Market.getDisplayDecimalsForPriceDifferences
computes the number of decimals to display in order for the smallest price difference to be visible.
- Adding address and other constants for test MGV token on Mumbai
Mangrove.offerLogic
now accepts the name of a predeployed multi user logic (offerProxy
oroasisLike
in this version)- Adding deployed addresses for
offerProxy
andoasisLike
inaddresses.json
- New
Market.getGivesWantsForVolumeAtPrice
method that converts a volume (in base tokens) and a price to appropriate gives and wants for either bids or asks. - Update the number of decimals to display for WETH=4, USDC=2, and DAI=2.
addresses.json
points to AAVE-v3 dApp addresses- Eliminate a Market initialization bug which could cause an error to be thrown #203
addresses.json
points to AAVE-v3 compatible ERC20 addresses on networkmaticmum
offerLogic
class is now compatible with multi-makers logics- ethers.js overrides can now be added to API functions that produce signed transactions
mgvToken.contract
accept a wider class of ERC20 (e.g. minting, blacklisting...) for ethers.js calls.- some bugfixes for various hanging issues
Market.OrderResult
now contains the rawethers.ContractReceipt
.
- Update address to newly deployed Mangrove core contracts (they now match the mangrove.js ABI files)
This version number was inadvertently skipped.
- Fix: Include root
tsconfig.json
which is referenced fromsrc/tsconfig.json
(this was causing issues with Vite) - Fix: Underestimation by estimateGas() when takerWants was low (issue #89).
- Chain-related constants are now in JSON files instead of TypeScript files and thus easily machine readable for other tools
- Following the removing of the new logging feature, a node-only dependency (
config
) has been removed to keep compatibility with browser environment
- The new logging has been stunted: It only logs to the console and without timestamps
- This is a temporary workaround to issue #220
- New
Market
options:desiredPrice
: allows one to specify a price point of interest. This will cause the cache to initially load all offers with this price or better.desiredVolume
: allows one to specify a volume of interest. This will cause the cache to initially load at least this volume (if available). The option uses the same specification as forestimateVolume
:desiredVolume: { given: 1, what: "base", to: "buy" }
will cause the asks semibook to be initialized with a volume of at least 1 base token.
- New
Market
subscription:market.afterBlock(n,callback)
will triggercallback
after the market events for blockn
have been processed. If the block has already been processed,callback
will be triggered at the next event loop. - Improve logging: add file logging, allow applications using the package to configure logging using local
config
file. - add support for keystore file (json wallet) (
Mangrove.connect(jsonWallet:{path 'path/to/file.json', password: <wallet password>})
) - New
partialFill
flag inOrderResult
: This flag will be true if the order was only partially filled. - New
Market
convenience estimator methodsestimateVolumeTo{Spend,Receive}
.
{Market|Semibook}.getPivotId
now fetches offers until a pivot can be determinedMarketCallback
s now receive anethers.providers.Log
instead of anethers.Event
- 2 new classes
OfferLogic
andLiquidityProvider
.OfferLogic
allows one to connect to an onchain offer logic and calls functions of theIOfferLogic.sol
interface. ALiquidityProvider
instance is obtained either direclty from aMangrove
instance, in which case the liquidity provider is the signer, or from anOfferLogic
instance, in which case all calls to Mangrove are done via the onchain contract. - the above classes subsume and replace the old
Maker
class. MgvToken
implementsbalanceOf
- Add experimental CLI:
mgv
. See README.md for instructions - You can do
market.buy({total: 100, price:null})
on a BAT/DAI market to buy BAT by spending 100 DAI, no (real) price limit. You can also specify a limit average price, and also specify atotal
in quote token onMarket#sell
.
- New Mangrove deployment
- All types now start with upper case
- All functions now start with lower case
- Removed
fromId
andblockNumber
fromMarket.BookOptions
Market.{subscribe|consoleAsks|consoleBids|prettyPrint}
are no longerasync
Market.{getBaseQuoteVolumes|getPrice|getWantsForPrice|getGivesForPrice}
are nowstatic
Market.Offer.{prev|next}
are nowundefined
(instead of0
) if there is no previous/next offerMarket.getPivot
renamed toMarket.getPivotId
Market.getPivotId
now returnsundefined
(instead of0
) if no offer with better price existsMarket.getPivotId
now throwsError
if the order book cache is insufficient to determine a pivot
- OfferMaker constructor is called Maker
market.consoleAsk
andmarket.consoleBids
now allows for pretty printing semi OBbids
andasks
allows for optional parametersgasreq
andgasprice
if one wants to change their values
- Add
bookOptions
to OfferMaker constructor. - Allow initializing markets&makers after construction.
- Uncertain pivot ids when pushing an offer will throw.
- TODO: allow giving bookOptions later
- Calling
maker.approveMangrove(token)
with no specified amount will approve the max amount. - Add override sto most functions
- User can add slippage limit to market orders
TODO fill in
Initial release