Cross chain position transfer made easy.

The problem RefiNext solves

It helps people to transfer there position from one protocol on a chain to another protocol in a different chain in a single click and gas efficiently. The user doesn't need to clear his position from one chain manually and then bridge the tokens on a different chain rather it is just a single click away to them.

Challenges we ran into

The best way to migrate the positions is using the flashloans for clearing your positions on a chain and then repaying the flashloan by the amount you get on opening a new position on another chain. But since we are dealing with cross chain stuffs, the flashloans can't be used since we won't be able to confirm the bridging in a single block. To solve this we need to come up with providing liquidity to our contracts/ refinancer so that the debt can be repaid and then rebalancing across chains as and when the amount is returned. Apart from this since the contracts are working cross chain, it's a little tricky to work with the testing and debugging.