Balmy
DCA
DCA
  • Introduction to the protocol
  • FAQ
  • Concepts
    • Positions
      • Actions
      • NFT/Permissions
      • Swap Intervals
    • Fees
    • Swaps
    • Token Integration
    • Yield Sources
  • Architecture
    • Core
      • Hub
      • Permission Manager
      • NFT Descriptor
    • Periphery
      • Companion
      • Libraries
  • Tech Guides
    • Interacting with the protocol
    • Smart Contract Registry
    • Swaps
      • Next Swap
      • Executing a Flash Swap
    • Position Management
      • Creating a Position
      • Modifying a Position
      • Withdrawing from a Position
      • Terminating a Position
    • Permission Management
    • Subgraphs
      • Playground
      • Fetch all pairs
      • Fetch all tokens
      • Fetch all active intervals
      • Fetch positions by address
    • Github
  • Mean explained by friends
    • By Perpetual Protocol
    • By Ceazor's Snack Sandwich
  • Other
    • Bug Reports
Powered by GitBook
On this page
  • Introduction
  • Responsibilities
  • Network Tokens
  • Multicall

Was this helpful?

  1. Architecture
  2. Periphery

Companion

PreviousPeripheryNextLibraries

Last updated 2 years ago

Was this helpful?

Introduction

As we explained before, the 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 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 to do so.

Responsibilities

Network Tokens

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.

Multicall

In order to make UX better for our users, is implemented through 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!

Hub
permissions
Open Zeppelin's Multicall
Swappers
Swappers
The Hub Companion