Sweetbridge: SweetTech: The Sweetcoin Token Generation Event (SWC-TGE)

  • Wednesday, 14 February 2018 19:46
I thought that generating Sweetcoin would be an easy process of instantiating the token contract on the public chain. I was wrong of course.We minted all the Sweetcoin that will ever be in one swoop on January 9 this year. It was quite an occasion. But this story is not just about an event, it is about some of the reasoning behind the token generation process.SWC generation! https://t.co/308sbfFOBf — @sweetbridgeincAlways account for the tax manThe IRS has a strong opinion on when it wants a share of the money that is transferred. You read correctly — transferring cryptocurrency constitutes a taxable event in the USA. This complicates things considerably.Where should the money ideally go?In order to avoid a tax bill in the millions, the accountants and lawyers advised us that the tokens would have to be minted into each initial account. This way, no transfer had taken place as the tokens had not existed before being stored in the distribution addresses.The token contractSome changes were necessary in the smart contract. The constructor had to contain the code for distributing all the minted tokens to a list of addresses. No big deal but the constructor went from looking like this:function SweetTokenLogic(address token_, TokenData data_,uint256 supply_,address rolesContract) TokenLogic(token_, data_, supply_, rolesContract) public{}to the slightly more complicatedfunction SweetTokenLogic(address token_,address tokenData_,address rolesContract,address[] initialWallets,uint256[] initialBalances) TokenLogic(token_, tokenData_, rolesContract) public{if (tokenData_ == address(0x0)) {uint256 totalSupply; require(initialBalances.length == initialWallets.length);for (uint256 i = 0; i < initialWallets.length; i++) { data.setBalances(initialWallets[i], initialBalances[i]); token.triggerTransfer(address(0x0), initialWallets[i], initialBalances[i]); totalSupply = Math.add(totalSupply, initialBalances[i]); } data.setSupply(totalSupply); }}Readers with a keen eye will notice that this constructor does not account for the possibility of duplicate addresses in the initialWallets parameter. Change this before reusing this code.Additionaly to the changes in the constructor we had to add a function in the token interface to trigger a transfer from the constructor. Our token contracts are split into Interface — Logic — Data The above constructor is the one for the Logic part. The code is available in our BitBucket.Logistics of a distributionFor the standard version, we could have minted 100'000'000 Sweetcoins to one owner’s address and take our time in transferring the coins to the different distribution addresses. This was obviously not possible, as all the addresses needed to exist beforehand.A big day for Sweetbridge as we officially Mint 100 million Sweetcoin #SWC - Go! — @sweetbridgeincMulti-Signatures galoreSweetbridge is a multinational organisation with divisions in 11 countries. In addition to those, early contributors and employees were getting their Sweetcoins in the TGE. This meant the creation of 28 multi signature wallets.In normal times this would not have been a problem but in early January a trading frenzy occured. Pushing gas prices up to 100 Giga Wei (GW) and slowing transaction mining to a crawl.It took us 5 hours to create the 28 multi-signature wallets. My advice: prepare your multi-sigs well in advance. It is impossible to predict a transaction frenzy. Transactions at 100GW are very costly.Lessons learnedA regular transfer is a taxable event in the USA. If your organisation is in the USA or has ties to the USA, mind the IRS.Plan your TGE well in advance. Especially if you will need a lot of multi-signature wallets to hold the tokens. If you have time to get this part done, your wallets will cost 100 times less. Literally.You can create your token contract at any time, so choose a time with low transaction volume. Celebrate once the contract has been included in a block. Nothing bad will happen if your contract has been around for a week when you celebrate.Use hardware wallets to secure your funds. Your project invested a lot of time, energy and money into your TGE, don’t get added to the list of hacked ICOs.Success! Time for bubbles.All in all a TGE can be one of the most exciting moments for a young project, as you get to see a new cryptocurrency appear. On the other hand, it simply means the real work of building network utility for the new token is just getting started!About SweetbridgeSweetbridge is a new economy built for commerce that enhances the world’s current economies. Sweetbridge and its alliance partners offer a unique set of blockchain protocols, applications and crypto-economics to create an economy of opportunity for all participants. The goal of Sweetbridge is to transform brittle, industrial-era commerce through decentralized industry ecosystems that create a faster, fairer value exchange, unleash working capital, better utilize resources, and optimize talent for the benefit of all participants. For more information, follow Sweetbridge on Twitter at @sweetbridgeinc or visit https://sweetbridge.com.SweetTech: The Sweetcoin Token Generation Event (SWC-TGE) was originally published in Sweetbridge on Medium, where people are continuing the conversation by highlighting and responding to this story.

Additional Info

Leave a comment

Make sure you enter all the required information, indicated by an asterisk (*). HTML code is not allowed.

Disclaimer: As a news and information platform, also aggregate headlines from other sites, and republish small text snippets and images. We always link to original content on other sites, and thus follow a 'Fair Use' policy. For further content, we take great care to only publish original material, but since part of the content is user generated, we cannot guarantee this 100%. If you believe we violate this policy in any particular case, please contact us and we'll take appropriate action immediately.

Our main goal is to make crypto grow by making news and information more accessible for the masses.