These are the current available operations:
Instrument | Description | In Assets | Out Assets |
Compound | Lend DAI | DAI | CDAI |
Compound | CDAI | DAI | |
Compound | Lend ETH | ETH | CETH |
Compound | CETH | ETH | |
Compound | USDC | CUSDC | |
Compound | CUSDC | USDC | |
Compound | WBTC | CWBTC | |
Compound | CWBTC | WBTC | |
Uniswap | DAI | ETH | |
Uniswap | ETH | DAI | |
Uniswap | USDC | ETH | |
Uniswap | ETH | USDC | |
Uniswap | WBTC | ETH | |
Uniswap | ETH | WBTC | |
Wrappers | Wrap ETH | ETH | WETH |
Wrappers | WETH | ETH | |
Defire | [ANY] | FUND TOKEN | |
Defire | FUND TOKEN | [ANY] |
It contains the information, query and action methods about a specific operation.
Object fields |
address string Smart contract address of the operation |
A query method that returns the list of assets that the operations receives.
const assets = await operation.query.getInAssets();
Returns |
This method returns a |
A query method that returns the list of assets that the operations returns.
const assets = await operation.query.getOutAssets();
Returns |
This method returns a |
A method to redirect the output of an asset to another operation. The amount that is redirected can be a fixed amount or a percentage.
operation.redirectOutput({address: "0x711ADB1DaC5B7B6Ec60857b59dE3eeB3aE8b8927",amount: "320000000000000000000", //320to: operation3.address}),operation.redirectOutput({address: "0x711ADB1DaC5B7B6Ec60857b59dE3eeB3aE8b8927",isPercentage: true,amount: "250000000000000000", //25%to: operation3.address}),
Method parameters |
address Smart contract address of of the asset to redirect. |
isPercentage If true, the amount field is not fixed but a percentage. Defaults: false |
amount Amount of the asset to redirect in wei format. If is percentage, must be between 0 and 1. |
to Smart contract address of another operation to redirect the assets. |