A Great ICO with a Rough Finish

Monaco Market
5 min readNov 16, 2021

--

I’m writing this as the Dev Lead of Monaco Market and CollectCoin for our great community that pushed us incredibly through our ICO. Thanks again for all the support! There will also be some technical information for those who are interested. If you don’t understand it all, it’s not a big deal. But it does represent a bit how risky blockchain development still is currently.

Update November 21st 2021

We could finally solve the technical issue and recover all funds from the ICO with the help of Gnosis. A huge thank you goes out to Richard Meissner from Gnosis to assist us with an updated Safe that consumes less gas so that we can transfer the BNB to our multisig wallet.

For those who are interested in the technical details: There is now a Safe Migrator contract on BSC that allows safe owners to turn their safe into a Safe contract that reduces gas costs. Richard was so kind to also provide a small user interface that creates the necessary transactions to perform the migration. It’s intended only for emergency cases such as ours and can only be performed by at least one of the actual safe owners. So safety is maintained in any case which makes this solution a beautiful one!

When DEX?

In order to solve the issue, the time locked wallet for our investors had to be created with an unlock date that we associate with our DEX launch. Please be aware that this is not fully confirmed at the time of writing as of now we have to align it with the upcoming marketing activities for the launch. It may be slightly adjusted, but we’ll keep you updated on all channels as well as in this article.

Another big thank you finally goes out to all of our supporters who have supported us the entire time despite this difficult situation!

End of update.

TL;DR

We currently can’t get the funds transferred to our multisig wallet. The BNBs are not gone, they are still in our contract. This is no scam.

The contract balance on BSC Scan

We know what the problem is and there are some options to transfer the funds. However, we currently cannot say exactly when a solution can be provided.

A sequence of events

As mentioned in the video, we tried to finalize the crowdsale on Saturday. Technically, it is a call to the finalize operation, which should do two things:

* Generate the timelocked wallets for the investors.
* Transfer the BNB into our multisig wallet.

You can observe the result on BSC Scan:

List of failed Finalize transactions

In the transaction details you can see that the operation to transfer the BNB to our Multisig Wallet failed with the reason ‘out of gas’.

Transaction Details showing out of gas for the send transaction

I noticed later that this operation only provided 2300 gas to the receiver to process the code to receive the BNB. Usually that is enough, with our PreSale contract it had been enough. But the new version of our multisig wallet needs more. Why? Because an event is emitted that increases interoperability and transparency on the blockchain. Good practice, but bad for us cause it consumes gas.

Why is it bad?

We use the address.send() function to transfer the BNB, the “safest way to send ETH (or BNB)” according to the documentation. Safe because the gas limit automatically prevents a re-entrancy attack. The gas limit was determined back in the days when 2,300 was sufficient to send even BNB to contracts that also implement a bit of logic. However, in the last few years, gas costs have been raised to the point where even a simple read of a variable consumes almost all the gas in the send transaction. I should have used a generic call operation to transfer the BNB to a contract that requires more than 2,300 gas.

In addition, the contract-specific design decisions that have been added have not exactly simplified things for us. The recipient, for example, can no longer be changed.

If we had included an operation to change the receiver of the funds, then we could have switched to a metamask address. But that wouldn’t have provided much confidence, because it would have allowed me to empty the contract and run away. So you see why we had decided against that.

We had also decided not to make the status manually changeable. A subsequent switch to Refund would at least have allowed investors to withdraw their funds. I would include this safety net next time because it is in the interest of investors.

Now, after all, on the blockchain, nothing is changeable that shouldn’t be changeable. So we couldn’t remedy that with the design decisions that we described. However, after a bit of research, we were able to determine that the new version of our multisig wallet uses a proxy pattern. This pattern is often used to make contracts updatable. In this case, the proxy only handles forwarding the transactions to the actual contract and remains unchanged except for the fact that the address of the target contract can be changed. So the contract behind the proxy can be updated without the caller having to update their contract as well.

So this is our current status, where we are looking with the manufacturer of the multisig wallet contract (Gnosis) a way to update the contract so that it uses less gas. To be exact, less than 2,300. I will update the article as soon as we have a result here.

What if this doesn’t work?

The problem described above, that gas costs have increased in the past, but the “safe” features keep the old gas limit, has already been addressed on Ethereum with the EIP-2930. The intention here is to give contracts a temporary way out, even with gas limits that are too low, to perform a transaction. Unfortunately, this EIP is not available on the Binance Smart Chain. It’s pretty new though and I don’t see a reason why Binance shouldn’t implement it. The good thing about the BSC is that it is not as decentralized as Ethereum. With only 21 validators, an update is easier to coordinate. While this is not a short-term solution, it also means that BSCs are not locked forever.

I can well understand that such things are very unsettling and I would like to apologize strongly for the trouble that’s been caused. We are at the front on something new, where it bumps the one or the other time. We continue to make every effort so that our users can operate in a safe decentralized environment.

If you have any other questions, post them here in the comments and we will answer them asap. We’ll also push any updates here as soon as available!

Thank you for your understanding.

Rainer

Links

Source Code of our Contract on github:
https://github.com/Skylight-Solutions/ico-contracts

Our Contract on BSC Scan:
https://bscscan.com/address/0x2e88201b92390cb1f4901651f668aed12d3e1f14

Youtube Video:
https://www.youtube.com/watch?v=c-KZ0Vcd4tM

Safe Migrator solution provided by Gnosis:
https://github.com/rmeissner/safe-migrator

--

--

Monaco Market
Monaco Market

Written by Monaco Market

monacomarket.co — The first NFT marketplace for real world investment grade goods.

No responses yet