Development FAQ
This page collects frequently asked questions specifically related to developin on Maverick's contracts.
Last updated
This page collects frequently asked questions specifically related to developin on Maverick's contracts.
Last updated
These are all linked on the page for each pool or boosted position.
The Maverick contracts are available on Ethereum Goerli for testing purposes. These are the same contracts used by Maverick on all networks. All addresses are listed here.
amountOutMinimum
?The PoolInformation contract has a calculateSwap
estimator. It will tell you the output you can expect. Then you can set amountOutMinimum
to a slightly smaller value, in order to limit slippage to a worst case value.
All of the aggregators (e.g., Odos, OpenOcean, 1inch, Paraswap) maintain APIs where you can route just through Maverickβs pools and find a best path.
binID
for a pool?Use binPositions
on the Pool contract: https://github.com/maverickprotocol/maverick-v1-interfaces/blob/main/contracts/interfaces/IPool.sol#L106
removeLiquidity
, how do I find binId
and amount
for a wallet address?The PoolInformation contract has a view function that will tell you the binId
of your positions. Once you have that, the Pool contract has a balanceOf
function that will tell you the amount per bin. You can also overestimate and the contract will only return the amount you actually have.
price
to tick
?The formula is log_1.0001(price) = tick * tickSpacing
Please see this page.