The router plays two equally important roles:

  1. It is the main contract through which users interact with the system. It facilitates the interactions with the vaults on the same or another chain thanks to a mechanism of operation batching.

  1. The router implements the logic for a specific bridge, and it’s the system’s gateway for the chain-to-chain message relaying. Routers are only intermediaries; they don’t hold any state or funds. There is only one Router per bridge and per chain.

Fuji’s Router is conceptually similar to the routing contracts of Uniswap V3, Compound III, and many others. It’s a facilitator contract and a convenient entry point for end-users. As the name suggests, it routes users’ requests according to some internal logic, saving them along the way the hassle of calling separately numerous other contracts (pools, vaults). One can perform several actions in a row by supplying the right sequence of actions.

The Router has some additional functionalities related to cross-chain message transfers. In the case of Connext, the router handles both “xCall” and “xReceive”, the cross-chain outbound and inbound calls.

Last updated