Migrating V2.1 Positions
This section outlines the process to migrate Bancor V2.1 positions to Bancor V3.
This process calculates all your available rewards and might be expensive
This step explains how to identify your position IDs.
- Execute the
protectedLiquidityIds
function (this is a Read function)

Input variable
Name | Type | Description |
---|---|---|
_provider | address | Your wallet address |
Output response
Name | Type | Description |
---|---|---|
id(s) | uint256 | 1 or more unique IDs that indicate the protected positions for the specified address |
This section explains how to identify the relevant data based on the unique position ID.
- Execute the
protectedLiquidity
function (this is a Read function)

Input variable
Name | Type | Description |
---|---|---|
_id | uint256 | A unique position ID |
Output response
Name | Type | Description |
---|---|---|
provider | address | The wallet address of the position owner |
poolToken | token | The pool token address *
(i.e. LINK/BNT pool token address) |
reserveToken | token | The reserve token address *
(i.e. LINK token address) |
poolAmount | uint256 | Pool token amount * |
reserveAmount | uint256 | Reserve token amount |
reserveRateN | uint256 | Rate of 1 protected reserve token in units of the other reserve token (numerator) |
reserveRateD | unit256 | Rate of 1 protected reserve token in units of the other reserve token (denominator) |
timestamp | unit256 | Timestamp of the original deposit |
* These values are needed for the
migratePositions
functionNow that you have your V2.1 protected position(s) data available, you can proceed in calling the migration function and move the funds to Bancor V3.
This process will migrate the full position and update the protection to 100% as a bonus
- Execute the
migratePositions
function (this is a Write function)

Input variable
Name | Type | Description |
---|---|---|
positionLists | PositionList | Array of data to define the pool, token and positions. |
Format example:
[["poolTokenAddress", "reserveTokenAddress", [ID1, ID2, ..]]]
[["0x5B38Da6a701c568545dCfcB03FcB875f56beddC4","0x5B38Da6a701c568545dCfcB03FcB875f56beddC4",[1,2,3]]]
You can group multiple IDs with the same
poolToken
and reserveToken
combination
i.e. all IDs for LINK from the LINK/BNT poolOnce executed successfully, the following will happen:
- 1.The v2.1 protected position(s) will no longer exist
- 2.The value of the protected tokens will be staked into Bancor V3
- 3.You would receive bnTokens that represent your migration
Last modified 9mo ago