Following the success of our token migration event, we’re circling back on a unique procedure.
When LGO was created in 2017, we deployed a smart contract which would allow us to create the LGO token. The smart contract was written and deployed on the Ethereum blockchain internally. At the time of the 1st scheduled bonus (August 2018) we realized an error had been made. This error in the code resulted in some LGO tokens being inaccessible to distribute our scheduled bonuses to our token holders.
As we realized this bug, and as an act of transparency, we informed our community. We decided to use our Reserves addresses to pay them out. Hence, Bonus 1 (August 2018) and 2 (February 2019) were paid through our reserves.
As this solution wasn’t viable for the next two bonus because of the loss of incentive between community and project if reserve tokens would be used, we decided to write and deploy a new, error-free, smart contract. As a pioneer in the field, ConsenSys helped us execute this transition.
“Blockchain means code is law: errors cannot be fixed the same way they can be in a centralized environment. We decided to act and find an innovative path to solving the problems that came with our smart contract bug. With the help of ConsenSys, we did what I believe to be one of the first large scale utility token migrations, eventually leading us to a better token governance and a definite added value to our token holders.” — Hugo Renaudin, CEO and Co-Founder of LGO
On July 17th, a new LGO smart contract was deployed and replaced our old one. The migration procedure, which we’ll explain below, was executed successfully and now allows LGO’s long lasting development.
So what exactly was changed in the smart contract code?
Our CTO Charles Couillard gives us a brief overview:
“We’ve deleted all bonus related features in the smart contract. The new version deployed is now only a simple erc20 contract with a burn feature.”
We’ve asked Julien Marchand, Tech Lead @ ConsenSys, a couple of questions to circle back on this unique procedure.
Has ConsenSys ever operated a bulk minting process before completing LGO’s? Was there a reason behind choosing this process instead of another?
“That was the first time we carried out a bulk minting operation on smart contracts. The reason we choose this approach was initially a reduction in the gas cost incurred (by a factor of 2), the total duration of the process but also having a more “atomic” minting operation, reducing the number of transactions from 8800 to 88, which makes errors easier to spot and fix.”
Is it a common procedure in the crypto space?
“This kind of migration is an exceptional process for a rare situation. It’s an open topic in the community, We took an approach to complete the shift in an atomic fashion, in a short time slot and without requiring each user to perform some actions.”
Could you explain the different steps of the procedure?
“The migration was performed in 4 steps:
- A week before the migration, the new smart contract was deployed, published on Etherscan and audited by third parties.
- On July 17th, events between block n°5183900 and n°8166887 were fetched on the initial contract to gather the Ethereum addresses involved in allocation or transfer operations (which are the potential holders).
- Then, users’ data were retrieved for the block n°8166887, this includes their current balance, initial allocation amount, bonus amount, bonus eligibility, etc. This operation required more than 100,000 web3 RPC calls to a node.
- Lastly, the bulk minting operation was performed in 88 transactions after the application of the modifications described in this Blog.”
Migrating to a new smart contract will allow us to move on and progress. As a reminder, here are a few fundamental points to remember.
- The total supply in new LGO is the same one as the old LGO supply would have been without the bug (181m released + 36m distributed in bonus).
- A new LGO token address has been created. It is called the LGO Incentive Pool.
- We have recreated the tokens in the reserves that were used to pay for bonus 1 and 2 and these tokens will be entirely staked in the LGO Incentive Pool.
- The LGO reserves which haven’t been used will be transferred to new addresses controlled by LGO with higher security standards. When calculating bonuses 3 and 4, the balances of these reserves will be considered untouched. Any bonus that should have been paid to these reserves will go to the incentive pool.
- Future bonuses will neither be paid to the reserve nor founders. Rather, they will be sent to the LGO Incentive Pool. Only token holders who haven’t moved LGO tokens out of their ICO address will receive the two remaining bonuses.
We’d like to thank our community for a smooth and easy migration procedure. We cannot wait to develop, accomplish and share further milestones with the help of our token holders.
The LGO Team
LGO has built and delivered a trading platform for digital assets with proprietary technology which is provably transparent, non-custodial and secure. The firm currently offers BTC / USD with additional pairs and currencies to be added in the future.