Business Logic


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


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).


User A wants to migrate

100.000000 (100000000) CHSB

He will approve the contract and migrate, getting back

100.000000000000000000 (100000000000000000000) BORG.


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 Security page.

Last updated