As we explained before, the Hub is the most important contract in the protocol. However, mostly due to contract size restrictions, the user experience is not the best. That's where the Companion comes into play.
The Companion is a smart contract that coexists and interacts with the Hub, while also combining the use of our Swappers infrastructure and API in order to make the user experience better and add some missing features.
In order for the Companion to be able to interact with your positions, you will need to explicitly give it permissions to do so.
Our protocol works natively with ERC20 tokens. However, some users might want to deposit or receive network tokens (like ETH, MATIC or BNB) in their positions. That's where the Companion comes into play.
It will allow users to seamlessly use their network tokens with their positions, while the Companion with it's swapping capabilities wraps and unwraps the tokens under the hood.
In order to make UX better for our users, Open Zeppelin's Multicall is implemented through Swappers as part of our Companion. By doing this, we can allow our users to execute many different operations in one transaction. For example:
- Withdraw from one position and create another with the withdrawn balance
- Increase the funds for many of your positions at once
- Swap tokens and create a position with the received ones
- And more!
The Hub Companion