5️⃣Version 5 Integrations

Learn more about how to integrate with the Version 5 API and Protocol

Version 5 Overview

Version 5 of the protocol has a single vault type - called a Dynamic Vault - which supports a wide variety of different yield products. It has combined many of the features supported by Fixed Term and Flexible Term Vaults in Version 4 into a single vault, and added many new features and capabilities.

Read more on the different vault types and exchange rates by following the links.

Integration Paths

There are two primary integration paths; on-chain integration or API integration.

API integrations are read only. On-chain integrations are read and write (e.g. deposit and withdraw).

Terminology

OpenTrade implements many of the ERC-4626 and ERC-20 standards. In some cases, the terminology we use in the product is different from those in the code. They are primarily

Term in Code
Display Name

Pool

Vault

Shares

Vault Tokens

Assets

USDC, EURC

Decimals / Formatting

The API returns numerical data types that should be rounded using the following conventions to calculate the display value.

For example, stablecoin values in the API should be rounded to 6 decimal places, where totalOutstandingLoanPrincipal of 1000000 would be equal to 1 USDC.

Type
Decimals
Example in Code
Example in Display

assets

6

1000000

1 USDC/EURC

shares

6

1000000

1 Vault Token

exchangeRate

18

1000261149376738066

1.000261

interestRate

2

500

5.00%

Last updated