📖
SwissBorg Docs
  • SwissBorg Documentation
  • BORG Migration
    • How to migrate?
      • SwissBorg app
      • Migration Website
      • Etherscan
    • Business Logic
    • Technical Documentation
      • SwissBorgToken.sol
      • ChsbToBorgMigrator.sol
    • Security
    • Audit
    • Contract Addresses
  • Bridge
    • How to bridge?
      • SwissBorg app
      • Bridge Website
    • Security
      • Rate Limiting
    • Audits
    • Contract Addresses
  • Whitepaper
    • Whitepaper
  • Links
    • SwissBorg
    • Github
    • Discord
    • Twitter
    • Twitter | Engineering & DeFi
Powered by GitBook
On this page
  • Migration
  • Pause
  1. BORG Migration

Business Logic

PreviousEtherscanNextTechnical Documentation

Last updated 1 year ago

Initialization

For organization reasons, the SwissBorgToken was created before the Migrator. The deployer of the contracts held the tokens until the migrator was deployed.

Migration

The exchange rate is:

1 CHSB = 1 * (10 ** 10) BORG

This is because the CHSB has 8 decimals, while the BORG has 18 decimals.

To migrate, users will need to first approve the spending of their CHSB by the migrator contract. This can be done through direct contract interaction but will also be implemented on our official frontend.

Then, they will be able to call the migrate function on the contract (again either via contract interaction or through our frontend) passing an amount of CHSB.

This function will take their CHSB and transfer an equivalent amount of BORG according to the exchange rate defined above (in wei).

Example:

User A wants to migrate

100.000000 (100000000) CHSB

He will approve the contract and migrate, getting back

100.000000000000000000 (100000000000000000000) BORG.

Pause

In case of problems, the manager might want to pause the migration.

After calling pause, any migrate transaction must revert.

When decided by the manager, the process can be unpaused through the unpause method. After this is called, any transaction calling migrate should be working again with the same exchange rate.

For more details about the manager and security in general, you can check the page.

Security
The "migrate" process.
The "pause" process.
The "unpause" process.