Custom Pools
Overview
This guide can assist our partners to manage custom pools based on the V2 protocol.
Prerequisites
Ethereum Node RPC, E.g. Alchemy or Infura.
Web3 SDK, E.g. Webjs.
Deployed Contract Addresses, E.g. Mainnet.
ABI json files at here.
Creating Custom Pools
Step | Contract | Method |
---|---|---|
Creating new pool | createPool | |
Adding group to the pool | addPoolGroup | |
Adding asset to the pool | addAssetERC20 addAssetERC721 | |
Setting asset risk parameters | setAssetClassGroup setAssetCollateralParams setAssetProtocolFee setAssetActive setAssetBorrowing setAssetFlashLoan | |
Config the interest rate | addAssetGroup |
Supply Assets
Deposit ERC20
Step | Contract | Method |
---|---|---|
Deposit some ERC20 token into the pool | depositERC20 | |
Withdraw some ERC20 token from the pool | withdrawERC20 |
Deposit ERC721
Step | Contract | Method |
---|---|---|
Deposit some ERC721 token into the pool | depositERC721 | |
Withdraw some ERC721 token from the pool | withdrawERC721 |
Borrow Assets
Step | Contract | Method |
---|---|---|
Borrow some ERC20 token from the pool | crossBorrowERC20 | |
Repay some ERC20 token into the pool | repayBorrowERC20 |
Last updated