BTB Finance for agents

Protocols / Dexs

Fluid DEX

Fluid DEX is an AMM whose pools draw liquidity from Fluid's shared Liquidity layer, so an LP position can also be used as collateral (Smart Collateral). An agent can list pools from the resolver, read reserves and prices, and swap or manage liquidity directly on each pool contract.

On-chainEVM8 contractsWebsite · Docs

get_protocol({ "protocol": "fluid-dex" })

Risks an agent should know

What an agent can do

find-poolsList Fluid DEX pools on a chain
DexResolver.getAllDexAddresses() on that chain. Read the pool's tokens with getPoolConstantsView(pool) on the reserves resolver.
swapSwap on one Fluid DEX pool
estimate with DexReservesResolver.estimateSwapIn(pool, swap0to1, amountIn, amountOutMin) via eth_call. Approve the pool for the input token, then call swapIn(swap0to1, amountIn, amountOutMin, to) on the pool address. swapOut(swap0to1, amountOut, amountInMax, to) is the exact-output version. Each pool is its own contract, so the call goes to the pool, not to the factory.
deposit-withdraw-liquidityAdd or remove liquidity on a pool
pool-level functions deposit(...), withdraw(...) and their perfect variants (depositPerfect, withdrawPerfect, withdrawPerfectInOneToken). Verified signatures are in notes. Approve the pool for each token first. Check the pool's limits with getDexLimits before large moves.
check-pool-stateRead reserves, prices and limits for one pool
eth_call getDexCollateralReserves(pool), getDexDebtReserves(pool), getDexPricesAndExchangePrices(pool) and getDexLimits(pool) on the DexReservesResolver or DexResolver.

Contracts

ethereum · chain id 1

ContractAddressKey functionsTry
DexFactory
factory
0x91716C4EDA1Fb55e84Bf8b4c7085f84285c19085
source
readtotalDexes()
readgetDexAddress(uint256)
readisDex(address)
Full ABI
DexResolver
other
0x11D80CfF056Cef4F9E6d23da8672fE9873e5cC07
source
readgetAllDexAddresses()
readgetDexAddress(uint256)
writegetDexPricesAndExchangePrices(address)
writegetDexCollateralReserves(address)
writegetDexDebtReserves(address)
Full ABI
DexReservesResolver
other
0x05Bd8269A20C472b148246De20E6852091BF16Ff
source
readgetAllPoolAddresses()
readgetDexLimits(address)
writeestimateSwapIn(address,bool,uint256,uint256)
writeestimateSwapOut(address,bool,uint256,uint256)
readgetPoolConstantsView(address)
Full ABI

base · chain id 8453

ContractAddressKey functionsTry
DexFactory
factory
0x91716C4EDA1Fb55e84Bf8b4c7085f84285c19085
source
readtotalDexes()
readgetDexAddress(uint256)
readisDex(address)
Full ABI
DexResolver
other
0x11D80CfF056Cef4F9E6d23da8672fE9873e5cC07
source
readgetAllDexAddresses()
readgetDexAddress(uint256)
writegetDexPricesAndExchangePrices(address)
writegetDexCollateralReserves(address)
writegetDexDebtReserves(address)
Full ABI
DexReservesResolver
other
0x05Bd8269A20C472b148246De20E6852091BF16Ff
source
readgetAllPoolAddresses()
readgetDexLimits(address)
writeestimateSwapIn(address,bool,uint256,uint256)
writeestimateSwapOut(address,bool,uint256,uint256)
readgetPoolConstantsView(address)
Full ABI

arbitrum · chain id 42161

ContractAddressKey functionsTry
DexFactory
factory
0x91716C4EDA1Fb55e84Bf8b4c7085f84285c19085
source
readtotalDexes()
readgetDexAddress(uint256)
Full ABI

polygon · chain id 137

ContractAddressKey functionsTry
DexFactory
factory
0x91716C4EDA1Fb55e84Bf8b4c7085f84285c19085
source
readtotalDexes()
readgetDexAddress(uint256)
Full ABI

Notes

Factory and resolver addresses are the same on every EVM chain Fluid supports (DexFactory 0x91716C4EDA1Fb55e84Bf8b4c7085f84285c19085, DexReservesResolver 0x05Bd8269A20C472b148246De20E6852091BF16Ff, DexResolver 0x11D80CfF056Cef4F9E6d23da8672fE9873e5cC07 on Ethereum, Base and Arbitrum). Plasma and BNB use a different DexResolver address, not included here. They are listed in the official deployments file. On Base, the factory reported 18 DEX pools when researched. Pool-level signatures were read from a verified Base pool on Sourcify and are the same on every pool of this type: swapIn(bool,uint256,uint256,address), swapOut(bool,uint256,uint256,address), swapInWithCallback(bool,uint256,uint256,address), swapOutWithCallback(bool,uint256,uint256,address), deposit(uint256,uint256,uint256,bool), depositPerfect(uint256,uint256,uint256,bool), withdraw(uint256,uint256,uint256,address), withdrawPerfect(uint256,uint256,uint256,address), withdrawPerfectInOneToken(uint256,uint256,uint256,address), borrow(uint256,uint256,uint256,address), payback(uint256,uint256,uint256,bool), plus borrowPerfect and paybackPerfect. Argument meanings for deposit and withdraw come from Fluid's documentation and were not fully verified, so read the verified source before using them. The earlier DexReservesResolver address (0xE8a07a...) from older proposals was not used. The resolver table in the official deployments file is the source for these addresses. Fluid's DEX Lite (deprecated) is not included. Fluid DefiLlama lists five chains (Ethereum, Arbitrum, Plasma, Polygon, Base); Plasma is omitted for this entry.

Sources

Researched 2026-11-28. Addresses are copied from the official sources above; check them before moving large amounts.