Core Concepts
This part of the documentation consists of information that will help OpenSwap users better understand the core concepts of Open Interchain Protocol.

Bridge Trolls

At the core of the interchain protocol is the concept of 'bridge trolls'. Bridge trolls perform the tasks of monitoring the protocol for transaction requests, verifying and signing transactions to carry out the withdrawal of funds on different blockchains. In order to ensure that trolls behave appropriately, they need to stake bonds in the form of the native OSWAP tokens which are put at risk if they carry out inappropriate actions. In return, they will be compensated with a portion of the transaction fees for carrying out the interchain activities.

Troll Types

There will be two types of Bridge Trolls in the Open Interchain ecosystem:
Green Trolls: Anyone can become a 'Green Troll' by running the bridge troll node software, possessing one or more bridge troll NFTs, and staking the qualifying OSWAP stake on the primary chain (concept of primary chain explained in a later section). The main duty of a Green bridge troll is to verify and sign bridge transactions assigned to them. The number of bridge trolls involved in a particular transaction will depend on the size of the transaction. The larger the transaction, the larger number of Green Trolls that will be assigned to validate the transaction. In return, the signing troll will receive a portion of the bridge fees.
MEAN Trolls: MEAN Trolls are upgraded Green Trolls. To be a 'MEAN Troll', will require a larger OSWAP qualification stake, and in return carry out additional responsibilities for a greater share of the transaction fees. To be trusted to carry out these additional responsibilities, all MEAN Trolls need to be voted into place by the bridge community and require a specific troll NFT key to serving this role. Additionally, MEAN Trolls need to post a bond on each chain to be eligible to participate in withdrawal tasks. Their assigned transactions are based on their ability to cover the transaction amount with their bonds.
MEAN Trolls can take on the following roles:
Every cycle (i.e. 20 minutes), the protocol will carry out an election to identify a new 'lead' MEAN Troll on each supported blockchain. The Lead MEAN Troll will have the following responsibilities:
  • Monitoring all other blockchains for new transaction requests
  • Verifying that the transactions are finalized (transaction completed on target chain) - once a transaction is finalized, no cancelations can be done
  • Assign another MEAN Troll to be the trx creator and additional MEAN Trolls and Green Trolls to sign & validate transactions based on the transaction size
  • Broadcast this new transaction along with the assignments & reference price to the message channel
Trx Creator
The assigned trx creator’s main task is to verify that the transaction matches the valid order on the source chain’s order contract and that all the signers have signed the transaction before adding their own signature and submitting the transaction to the target chain. The trx creator will be the recipient of part of the bridge fee called the ‘chain fee’ as that portion will be used to compensate for the gas required to submit the transaction on the target chain.
When the chosen trx creator’s bond is insufficient for the transaction size, additional MEAN trolls may be assigned a role as a ‘signer’. In such a scenario, these MEAN trolls will also verify and sign the transaction, returning the signed trx on the message channel.
There may also be situations where assigned trolls do not fulfill their duty of signing a transaction within the allotted time. In such scenarios, any MEAN troll may also sign the transaction to get a share of the transaction fee.
Price Validator
When the OSWAP reference price exceeds 1% of the price from a prior order, then additional MEAN trolls will be assigned to validate the new price and sign the transaction.

Qualification Stakes

During the initial feature launch, Qualification Stakes to be a bridge troll will tentatively be set as the following example figures:
E.g. Green Troll: 25,000 OSWAP E.g. MEAN Troll: 250,000 OSWAP These staking parameters can be modified through a governance vote. It is reminded again that MEAN trolls also need to be successfully voted in before they can perform that role.

Bridge Troll Qualification NFTs

Bridge Troll Qualification NFTs will be issued to strengthen the bond of the community and also serve the purpose of serving as a 'key' to becoming a bridge troll. Details of the NFTs will be shared separately in the 'Troll Camp' documentation. The general concept is that bridge troll operators will be required to have specific NFT(s) in their operator address to run a bridge troll node.

Single Asset Vaults

The second key concept is 'Single Asset Vaults'. These are vault smart contracts that exist on chains supported by OpenSwap. They provide liquidity providers the opportunity to put their digital assets to work without the worry of impermanent loss. These vaults will be considered to be 1:1 representatives of the bridge tokens on the different chains.
This enables the protocol to release a corresponding amount of the target chain's version of the token once the source chain's tokens are confirmed to be deposited.
A key feature of these smart contracts is the dynamic multi-sig feature that governs the release of funds. Funds can only be transferred out of a vault if it is signed by a multiplicity of bridge trolls (to be described later). A set of rules governs how transactions are signed based on the size of a transaction. Essentially, the number of signers required will be proportional to the swap transaction size ensuring that bonded stakes sufficiently cover the swap transactions so that malicious behavior is mitigated.
It is also expected that the majority of the bridge vaults will be for stablecoins such as USDT, DAI, BUSD, or core native chain tokens such as BNB or ETH.

Dynamic Multisig Withdrawal

Funds in bridge vaults are released based on a dynamic multi-sig arrangement whereby the following sets of rules need to be satisfied before funds are released:
  • The cumulative bond of the MEAN trolls that signed the transaction must exceed the value of the withdrawal transaction.
  • All of the signatories are active trolls in good standing.
  • The Number of Green Troll signers based on Trx size of signers. A set formula will define the number of Green trolls that also need to sign a Trx sizes increase.
Any malicious transactions created or signed will result in the loss of bonded OSWAP from participating trolls and immediate locking as a bridge troll.

Primary Chain

The protocol is designed to be easily extendable by simply replicating the smart contracts on new EVM compatible chains. However, there are certain functionalities that only need to be done once (i.e. registration of a troll) and thus the concept of a 'primary chain' is established.
A specific blockchain will be selected as the 'primary chain' meaning that for certain features, that chain's contracts will behave as the master, and the other 'secondary chains' will serve as 'replicates'. This feature only applies to:
  • Troll Registry
  • Troll Qualification Stakes
Initially, the primary chain will be defined as the Binance Smart Chain, however, this can be transitioned if the bridge community chooses to.

Troll Selection Algorithm

The last core concept in this part of the documentation is the troll selection process, and it is based on the following 2 concepts:
  • Fuzzy Round Robin: Instead of enforcing a strict round-robin selection of trolls for signing and trx creator, a rule stating that a MEAN troll must have a gap of at least X transactions before they can be trx creators again serves as a fuzzy round-robin that provides flexibility for unavailable trolls. (i.e. if the total number of MEAN trolls was 10, this X could be set to 8 to enforce a type of fuzzy round-robin).
  • Lead Troll Election: Every cycle (i.e. 20 minutes) the MEAN trolls will carry out an internal election to identify a new 'lead troll'. Note that each blockchain will have its own 'lead troll' (it is possible for a MEAN troll to be simultaneously elected as a 'lead troll' on multiple chains). Only trolls available during the election will be able to be elected. As noted previously, the lead troll has the responsibility of monitoring other chains for new transactions involving the chain that the troll is carrying 'lead' responsibilities for.
In the event that the lead troll does not carry out its responsibilities, a new leader election will be triggered.

Wish to learn more about the OpenSwap platform?

To interact with the OpenSwap platform, please explore the following link:
We encourage community members to partake in community discussions to help better shape OpenSwap's platform. Users may get in touch with core team members through joining the OpenSwap telegram group:
Last modified 2mo ago