Skip to main content
Liquidity layer that unifies lending and DEX liquidity. Deposited assets simultaneously serve as lending collateral and DEX liquidity.

Notes

  • Deposited assets serve dual purpose as lending collateral AND DEX liquidity
  • No interest rate mode selection — all rates are algorithmically determined
  • Same contract address on Ethereum and Arbitrum
  • Built by the Instadapp team
  • All deposit/repay operations require ERC-20 approval (to the fToken or Vault)

Its names in a program

On Ethereum, Fluid is a namespace: its contracts need no import.

Deployments

ABI

Where a line says what an address it returns is, a program that calls the function through its namespace calls that contract’s methods on the result directly: <Namespace>.<Contract>.<function>(...).<method>(...). A token’s methods are the ERC-20 functions, and its writes are SafeERC20.

FluidLendingABI

import FluidLendingABI from "./protocols/fluid/FluidLendingABI.json";
  • deposit(uint256 assets, address receiver) returns (uint256 shares)
  • withdraw(uint256 assets, address receiver, address owner) returns (uint256 shares)
  • redeem(uint256 shares, address receiver, address owner) returns (uint256 assets)
  • asset() view returns (address): the address is a token

FluidVaultABI

import FluidVaultABI from "./protocols/fluid/FluidVaultABI.json";
  • operate(uint256 nftId, int256 newCol, int256 newDebt, address to) payable returns (uint256, int256, int256)

Next steps