BTB
/

ICHI

Liquidity Managerwebsite
Single-sided and two-sided liquidity vaults on Uniswap V3 style DEXes. Deposit one token (or both) and receive vault LP shares. ICHI manages the concentrated positions and their ranges, and withdrawals return both tokens in proportion.

What you can do

find-vaultFind a vault for a pair and feevaultKey = guard.vaultKey(vaultDeployer, token0, token1, fee, allowToken0, allowToken1) (or factory.genKey), then factory.getICHIVault(key). Zero address means no vault. Token order must match the sorted token0 and token1.
deposit-singleDeposit one token into a vaultapprove the DepositGuard for the token, then guard.forwardDepositToICHIVault(vault, vaultDeployer, token, amount, minimumProceeds, you). Use the native variant to send the chain's native token.
deposit-two-sidedDeposit both tokens directly into a vaultapprove the vault for token0 and token1, then vault.deposit(deposit0, deposit1, you). Check deposit0Max and deposit1Max first.
withdrawWithdraw LP sharesapprove the DepositGuard for the vault shares, then guard.forwardWithdrawFromICHIVault(vault, vaultDeployer, shares, you, minAmount0, minAmount1). Or vault.withdraw(shares, you) directly.
check-positionValue a positionamount0, amount1 = getTotalAmounts(); your share = balanceOf(you) / totalSupply(). Multiply to get your amounts.
ICHI vaults manage a Uniswap V3 style position (base and limit ranges). Price moves outside the range, and impermanent loss, reduce the position value.
The owner of each vault can rebalance the ranges and swap the balance (rebalance). Users depend on the owner's operation, so check the vault owner and recent rebalances before large deposits.
Vault shares cap at maxTotalSupply and deposits cap at deposit0Max and deposit1Max, so a large deposit can revert.
Single-sided vaults accept only one token. The minimumProceeds, minAmount0 and minAmount1 arguments are the slippage guards, so set them above zero rather than leaving them at 0.

Contracts

Read any function, or build a write and sign it. Amounts are in base units (1 USDC = 1000000).
ICHI DepositGuard (SaucerSwap, hedera)router on hedera0x1B0ef045830466171D617dD0F1142aD699A4Cd63
write forwardDepositToICHIVault(address,address,address,uint256,uint256,address)
Deposit one token into an ICHI vault through the guard. Arguments: vault, vaultDeployer (from the chain's config), token (the deposit token), amount (smallest unit), minimumProceeds (minimum LP shares, reverts below it), to (receives the shares). Approve the guard for token first. Use this for a single token deposit.
write forwardNativeDepositToICHIVault(address,address,uint256,address)
Deposit the chain's native token (sent as msg.value) into a vault. Arguments: vault, vaultDeployer, minimumProceeds, to. The guard wraps the native token itself.
write forwardWithdrawFromICHIVault(address,address,uint256,address,uint256,uint256)
Burn vault shares and receive both tokens. Arguments: vault, vaultDeployer, shares, to, minAmount0, minAmount1 (slippage floors). Approve the guard for the vault shares first.
write forwardNativeWithdrawFromICHIVault(address,address,uint256,address,uint256,uint256)
Same as forwardWithdrawFromICHIVault, but the wrapped native token is unwrapped and sent to the recipient as the chain's native token.
read vaultKey(address,address,address,bool,bool)
Key the factory uses to store a vault: vaultDeployer, token0, token1, allowToken0, allowToken1. Use it to look up a vault address before depositing.
read ICHIVaultFactory()
The ICHIVaultFactory this guard forwards to for this DEX. Check it matches the factory in this entry.
read WRAPPED_NATIVE()
Wrapped native token of the chain used by the native deposit and withdraw functions.
ICHIVaultFactory (SaucerSwap, hedera)factory on hedera0xb62399d23d1c81f08eA445A42d7F15cC12090A71
write createICHIVault(address,bool,address,bool,uint24)
Create a vault for a token pair and fee tier. Arguments: tokenA, allowTokenA, tokenB, allowTokenB, fee (Uniswap-style fee tier, for example 500 for 0.05%). allowToken flags say whether deposits in that token are accepted (one flag true makes a single-sided vault). Check the factory source for who may call it.
read getICHIVault(bytes32)
Vault address for a key from genKey. Returns the zero address if no vault exists for that key.
read genKey(address,address,address,uint24,bool,bool)
Build the lookup key for a vault: deployer (vaultDeployer), token0, token1, fee, allowToken0, allowToken1. Use it with getICHIVault to find a vault without an indexer.
read allVaults(uint256)
Vault at a given index in the factory's list of all vaults.
read uniswapV3Factory()
Underlying DEX factory the vaults use.
read feeRecipient()
Address that receives vault fees.
read baseFee()
Base fee charged by the factory, as set by its owner.
read ammFee()
AMM fee component of fees, as set by the owner.
ICHI DepositGuard (UniswapV3, base)router on base0xe2381b5AFae99B899596Bc550184a080dAa31F26
write forwardDepositToICHIVault(address,address,address,uint256,uint256,address)
Deposit one token into an ICHI vault through the guard. Arguments: vault, vaultDeployer (from the chain's config), token (the deposit token), amount (smallest unit), minimumProceeds (minimum LP shares, reverts below it), to (receives the shares). Approve the guard for token first. Use this for a single token deposit.
write forwardNativeDepositToICHIVault(address,address,uint256,address)
Deposit the chain's native token (sent as msg.value) into a vault. Arguments: vault, vaultDeployer, minimumProceeds, to. The guard wraps the native token itself.
write forwardWithdrawFromICHIVault(address,address,uint256,address,uint256,uint256)
Burn vault shares and receive both tokens. Arguments: vault, vaultDeployer, shares, to, minAmount0, minAmount1 (slippage floors). Approve the guard for the vault shares first.
write forwardNativeWithdrawFromICHIVault(address,address,uint256,address,uint256,uint256)
Same as forwardWithdrawFromICHIVault, but the wrapped native token is unwrapped and sent to the recipient as the chain's native token.
read vaultKey(address,address,address,bool,bool)
Key the factory uses to store a vault: vaultDeployer, token0, token1, allowToken0, allowToken1. Use it to look up a vault address before depositing.
read ICHIVaultFactory()
The ICHIVaultFactory this guard forwards to for this DEX. Check it matches the factory in this entry.
read WRAPPED_NATIVE()
Wrapped native token of the chain used by the native deposit and withdraw functions.
ICHIVaultFactory (UniswapV3, base)factory on base0xaBe5B5AC472Ead17B4B4CaC7fAF42430748ab3b3
write createICHIVault(address,bool,address,bool,uint24)
Create a vault for a token pair and fee tier. Arguments: tokenA, allowTokenA, tokenB, allowTokenB, fee (Uniswap-style fee tier, for example 500 for 0.05%). allowToken flags say whether deposits in that token are accepted (one flag true makes a single-sided vault). Check the factory source for who may call it.
read getICHIVault(bytes32)
Vault address for a key from genKey. Returns the zero address if no vault exists for that key.
read genKey(address,address,address,uint24,bool,bool)
Build the lookup key for a vault: deployer (vaultDeployer), token0, token1, fee, allowToken0, allowToken1. Use it with getICHIVault to find a vault without an indexer.
read allVaults(uint256)
Vault at a given index in the factory's list of all vaults.
read uniswapV3Factory()
Underlying DEX factory the vaults use.
read feeRecipient()
Address that receives vault fees.
read baseFee()
Base fee charged by the factory, as set by its owner.
read ammFee()
AMM fee component of fees, as set by the owner.
ICHI DepositGuard (UniswapV3, ethereum)router on ethereum0x3E1aFdB89B6Ea49e828C565ab6A36a485b7A4775
write forwardDepositToICHIVault(address,address,address,uint256,uint256,address)
Deposit one token into an ICHI vault through the guard. Arguments: vault, vaultDeployer (from the chain's config), token (the deposit token), amount (smallest unit), minimumProceeds (minimum LP shares, reverts below it), to (receives the shares). Approve the guard for token first. Use this for a single token deposit.
write forwardNativeDepositToICHIVault(address,address,uint256,address)
Deposit the chain's native token (sent as msg.value) into a vault. Arguments: vault, vaultDeployer, minimumProceeds, to. The guard wraps the native token itself.
write forwardWithdrawFromICHIVault(address,address,uint256,address,uint256,uint256)
Burn vault shares and receive both tokens. Arguments: vault, vaultDeployer, shares, to, minAmount0, minAmount1 (slippage floors). Approve the guard for the vault shares first.
write forwardNativeWithdrawFromICHIVault(address,address,uint256,address,uint256,uint256)
Same as forwardWithdrawFromICHIVault, but the wrapped native token is unwrapped and sent to the recipient as the chain's native token.
read vaultKey(address,address,address,bool,bool)
Key the factory uses to store a vault: vaultDeployer, token0, token1, allowToken0, allowToken1. Use it to look up a vault address before depositing.
read ICHIVaultFactory()
The ICHIVaultFactory this guard forwards to for this DEX. Check it matches the factory in this entry.
read WRAPPED_NATIVE()
Wrapped native token of the chain used by the native deposit and withdraw functions.
ICHIVaultFactory (UniswapV3, ethereum)factory on ethereum0x5a40DFaF8C1115196A1CDF529F97122030F26112
write createICHIVault(address,bool,address,bool,uint24)
Create a vault for a token pair and fee tier. Arguments: tokenA, allowTokenA, tokenB, allowTokenB, fee (Uniswap-style fee tier, for example 500 for 0.05%). allowToken flags say whether deposits in that token are accepted (one flag true makes a single-sided vault). Check the factory source for who may call it.
read getICHIVault(bytes32)
Vault address for a key from genKey. Returns the zero address if no vault exists for that key.
read genKey(address,address,address,uint24,bool,bool)
Build the lookup key for a vault: deployer (vaultDeployer), token0, token1, fee, allowToken0, allowToken1. Use it with getICHIVault to find a vault without an indexer.
read allVaults(uint256)
Vault at a given index in the factory's list of all vaults.
read uniswapV3Factory()
Underlying DEX factory the vaults use.
read feeRecipient()
Address that receives vault fees.
read baseFee()
Base fee charged by the factory, as set by its owner.
read ammFee()
AMM fee component of fees, as set by the owner.
ICHI DepositGuard (UniswapV3, bsc)router on bsc0xa9b751f37857790D0412c81B072DB57CCc0aF545
write forwardDepositToICHIVault(address,address,address,uint256,uint256,address)
Deposit one token into an ICHI vault through the guard. Arguments: vault, vaultDeployer (from the chain's config), token (the deposit token), amount (smallest unit), minimumProceeds (minimum LP shares, reverts below it), to (receives the shares). Approve the guard for token first. Use this for a single token deposit.
write forwardNativeDepositToICHIVault(address,address,uint256,address)
Deposit the chain's native token (sent as msg.value) into a vault. Arguments: vault, vaultDeployer, minimumProceeds, to. The guard wraps the native token itself.
write forwardWithdrawFromICHIVault(address,address,uint256,address,uint256,uint256)
Burn vault shares and receive both tokens. Arguments: vault, vaultDeployer, shares, to, minAmount0, minAmount1 (slippage floors). Approve the guard for the vault shares first.
write forwardNativeWithdrawFromICHIVault(address,address,uint256,address,uint256,uint256)
Same as forwardWithdrawFromICHIVault, but the wrapped native token is unwrapped and sent to the recipient as the chain's native token.
read vaultKey(address,address,address,bool,bool)
Key the factory uses to store a vault: vaultDeployer, token0, token1, allowToken0, allowToken1. Use it to look up a vault address before depositing.
read ICHIVaultFactory()
The ICHIVaultFactory this guard forwards to for this DEX. Check it matches the factory in this entry.
read WRAPPED_NATIVE()
Wrapped native token of the chain used by the native deposit and withdraw functions.
ICHIVaultFactory (UniswapV3, bsc)factory on bsc0x065356d9f628cDd1bb9F2384E2972CdAC50f51b7
write createICHIVault(address,bool,address,bool,uint24)
Create a vault for a token pair and fee tier. Arguments: tokenA, allowTokenA, tokenB, allowTokenB, fee (Uniswap-style fee tier, for example 500 for 0.05%). allowToken flags say whether deposits in that token are accepted (one flag true makes a single-sided vault). Check the factory source for who may call it.
read getICHIVault(bytes32)
Vault address for a key from genKey. Returns the zero address if no vault exists for that key.
read genKey(address,address,address,uint24,bool,bool)
Build the lookup key for a vault: deployer (vaultDeployer), token0, token1, fee, allowToken0, allowToken1. Use it with getICHIVault to find a vault without an indexer.
read allVaults(uint256)
Vault at a given index in the factory's list of all vaults.
read uniswapV3Factory()
Underlying DEX factory the vaults use.
read feeRecipient()
Address that receives vault fees.
read baseFee()
Base fee charged by the factory, as set by its owner.
read ammFee()
AMM fee component of fees, as set by the owner.
ICHI DepositGuard (SwapX, sonic)router on sonic0x65CD1f0ac298519BE4891B5812053e00BD2074AC
write forwardDepositToICHIVault(address,address,address,uint256,uint256,address)
Deposit one token into an ICHI vault through the guard. Arguments: vault, vaultDeployer (from the chain's config), token (the deposit token), amount (smallest unit), minimumProceeds (minimum LP shares, reverts below it), to (receives the shares). Approve the guard for token first. Use this for a single token deposit.
write forwardNativeDepositToICHIVault(address,address,uint256,address)
Deposit the chain's native token (sent as msg.value) into a vault. Arguments: vault, vaultDeployer, minimumProceeds, to. The guard wraps the native token itself.
write forwardWithdrawFromICHIVault(address,address,uint256,address,uint256,uint256)
Burn vault shares and receive both tokens. Arguments: vault, vaultDeployer, shares, to, minAmount0, minAmount1 (slippage floors). Approve the guard for the vault shares first.
write forwardNativeWithdrawFromICHIVault(address,address,uint256,address,uint256,uint256)
Same as forwardWithdrawFromICHIVault, but the wrapped native token is unwrapped and sent to the recipient as the chain's native token.
read vaultKey(address,address,address,bool,bool)
Key the factory uses to store a vault: vaultDeployer, token0, token1, allowToken0, allowToken1. Use it to look up a vault address before depositing.
read ICHIVaultFactory()
The ICHIVaultFactory this guard forwards to for this DEX. Check it matches the factory in this entry.
read WRAPPED_NATIVE()
Wrapped native token of the chain used by the native deposit and withdraw functions.
ICHIVaultFactory (SwapX, sonic)factory on sonic0x34513e8A327987Bb44acF5A925a7f3b4092d8b5F
write createICHIVault(address,bool,address,bool,uint24)
Create a vault for a token pair and fee tier. Arguments: tokenA, allowTokenA, tokenB, allowTokenB, fee (Uniswap-style fee tier, for example 500 for 0.05%). allowToken flags say whether deposits in that token are accepted (one flag true makes a single-sided vault). Check the factory source for who may call it.
read getICHIVault(bytes32)
Vault address for a key from genKey. Returns the zero address if no vault exists for that key.
read genKey(address,address,address,uint24,bool,bool)
Build the lookup key for a vault: deployer (vaultDeployer), token0, token1, fee, allowToken0, allowToken1. Use it with getICHIVault to find a vault without an indexer.
read allVaults(uint256)
Vault at a given index in the factory's list of all vaults.
read uniswapV3Factory()
Underlying DEX factory the vaults use.
read feeRecipient()
Address that receives vault fees.
read baseFee()
Base fee charged by the factory, as set by its owner.
read ammFee()
AMM fee component of fees, as set by the owner.
ICHI DepositGuard (Velodrome, celo)router on celo0x141dB85183DDB07Dee22C33846aebDe2101D9F25
write forwardDepositToICHIVault(address,address,address,uint256,uint256,address)
Deposit one token into an ICHI vault through the guard. Arguments: vault, vaultDeployer (from the chain's config), token (the deposit token), amount (smallest unit), minimumProceeds (minimum LP shares, reverts below it), to (receives the shares). Approve the guard for token first. Use this for a single token deposit.
write forwardNativeDepositToICHIVault(address,address,uint256,address)
Deposit the chain's native token (sent as msg.value) into a vault. Arguments: vault, vaultDeployer, minimumProceeds, to. The guard wraps the native token itself.
write forwardWithdrawFromICHIVault(address,address,uint256,address,uint256,uint256)
Burn vault shares and receive both tokens. Arguments: vault, vaultDeployer, shares, to, minAmount0, minAmount1 (slippage floors). Approve the guard for the vault shares first.
write forwardNativeWithdrawFromICHIVault(address,address,uint256,address,uint256,uint256)
Same as forwardWithdrawFromICHIVault, but the wrapped native token is unwrapped and sent to the recipient as the chain's native token.
read vaultKey(address,address,address,bool,bool)
Key the factory uses to store a vault: vaultDeployer, token0, token1, allowToken0, allowToken1. Use it to look up a vault address before depositing.
read ICHIVaultFactory()
The ICHIVaultFactory this guard forwards to for this DEX. Check it matches the factory in this entry.
read WRAPPED_NATIVE()
Wrapped native token of the chain used by the native deposit and withdraw functions.
ICHIVaultFactory (Velodrome, celo)factory on celo0x82DcA62C4B5Dd28Cc85CE8Ae3B170Ce020e33870
write createICHIVault(address,bool,address,bool,uint24)
Create a vault for a token pair and fee tier. Arguments: tokenA, allowTokenA, tokenB, allowTokenB, fee (Uniswap-style fee tier, for example 500 for 0.05%). allowToken flags say whether deposits in that token are accepted (one flag true makes a single-sided vault). Check the factory source for who may call it.
read getICHIVault(bytes32)
Vault address for a key from genKey. Returns the zero address if no vault exists for that key.
read genKey(address,address,address,uint24,bool,bool)
Build the lookup key for a vault: deployer (vaultDeployer), token0, token1, fee, allowToken0, allowToken1. Use it with getICHIVault to find a vault without an indexer.
read allVaults(uint256)
Vault at a given index in the factory's list of all vaults.
read uniswapV3Factory()
Underlying DEX factory the vaults use.
read feeRecipient()
Address that receives vault fees.
read baseFee()
Base fee charged by the factory, as set by its owner.
read ammFee()
AMM fee component of fees, as set by the owner.
ICHI vault WETH/USDC 0.05% (USDC side, single-sided)vault on base0x6559ca201e82977745b4619A07323f43500A85e1
write deposit(uint256,uint256,address)
Deposit token0 and token1 amounts (deposit0, deposit1) and mint LP shares to 'to'. Approve the vault for each token you deposit. For a single-sided vault pass 0 for the token that is not allowed. Reverts above deposit0Max or deposit1Max.
write withdraw(uint256,address)
Burn LP shares and receive token0 and token1 in proportion. Arguments: shares, to. Returns amount0 and amount1.
read getTotalAmounts()
Total token0 and token1 held by the vault across its base and limit positions and idle balance.
read balanceOf(address)
LP share balance of an account.
read totalSupply()
Total LP shares outstanding.
read token0()
First token of the pair (sorted by address).
read token1()
Second token of the pair.
read pool()
Underlying Uniswap V3 style pool the vault manages.
read allowToken0()
True if deposits in token0 are accepted.
read allowToken1()
True if deposits in token1 are accepted.
read maxTotalSupply()
Cap on total LP shares. Deposits above it revert.
read deposit0Max()
Largest token0 amount accepted per deposit.
read deposit1Max()
Largest token1 amount accepted per deposit.
read currentTick()
Current tick of the underlying pool.
read baseLower()
Lower tick of the base position.
read baseUpper()
Upper tick of the base position.
read limitLower()
Lower tick of the limit position.
read limitUpper()
Upper tick of the limit position.
write rebalance(int24,int24,int24,int24,int256)
Owner-only. Moves the base and limit ranges and swaps the balance. Not a user function; users should watch the ranges for changes.
ICHI vault WETH/USDC 0.05% (WETH side, single-sided)vault on base0xC6636fF1a005017b818f7225F2B2fE35a36463eF
write deposit(uint256,uint256,address)
Deposit token0 and token1 amounts (deposit0, deposit1) and mint LP shares to 'to'. Approve the vault for each token you deposit. For a single-sided vault pass 0 for the token that is not allowed. Reverts above deposit0Max or deposit1Max.
write withdraw(uint256,address)
Burn LP shares and receive token0 and token1 in proportion. Arguments: shares, to. Returns amount0 and amount1.
read getTotalAmounts()
Total token0 and token1 held by the vault across its base and limit positions and idle balance.
read balanceOf(address)
LP share balance of an account.
read totalSupply()
Total LP shares outstanding.
read token0()
First token of the pair (sorted by address).
read token1()
Second token of the pair.
read pool()
Underlying Uniswap V3 style pool the vault manages.
read allowToken0()
True if deposits in token0 are accepted.
read allowToken1()
True if deposits in token1 are accepted.
read maxTotalSupply()
Cap on total LP shares. Deposits above it revert.
read deposit0Max()
Largest token0 amount accepted per deposit.
read deposit1Max()
Largest token1 amount accepted per deposit.
read currentTick()
Current tick of the underlying pool.
read baseLower()
Lower tick of the base position.
read baseUpper()
Upper tick of the base position.
read limitLower()
Lower tick of the limit position.
read limitUpper()
Upper tick of the limit position.
write rebalance(int24,int24,int24,int24,int256)
Owner-only. Moves the base and limit ranges and swaps the balance. Not a user function; users should watch the ranges for changes.