Small Grants: Infinite Auction to raise funds for Ukraine

As @Noun219 correctly pointed out, the problem was that two of the toadz weren’t minted yet, so that’s why the capture function would have failed. Now both are already minted, so all transactions will succeed.

Hey @haltakov, while this was one of the issues, there is one unavoidable revert that’s detailed here. It would be best to cancel the proposal at this time and pick up discussion on possible options.

OK, thank you for the detailed analysis! So, basically, the DAO wallet cannot receive the ERC-1155 NFT which causes the transaction to fail. I agree we should cancel the proposal now and look for an alternative.

Does the DAO have other wallets? For example, a Gnosis Safe that could hold the NFT?

I see 2 alternative options currently:

  1. The funds are transferred to another wallet (for example a Gnosis Safe of the DAO) and then the capture function is called. The big downside of this is of course that the execution is not on-chain.
  2. I can write another smart contract which can be called from the DAO. The following can be done in a single atomic transaction and you can of course review all the code:
  • The DAO calls a function in the new smart contract and transfers the funds
  • The new smart contract calls the capture function of the Rescue Toadz contract spending the funds.
  • The new smart contract receives the ERC-1155 NFTs and sends them to a DAO wallet.

What do you think?

I have to ask @Noun219 to cancel the current proposal since I don’t have a noun and cannot create/reject proposals. Thank you!

Sorry, I’ve just read the thread and proposal is active already. I don’t see an option to cancel it
@solimander Thank you for the thorough analysis. @haltakov I hope you’ll figure out out a way to make it all work

We don’t expose a way to cancel the proposal through the frontend, but you can use Etherscan by calling cancel with the proposal ID (50):

Both options have their flaws.

As you pointed out, option 1 requires trust. While option 2 would be trustless, anyone could cause the proposal transaction to fail by donating an amount greater than the DAO’s donation to any of the 7 Rescue Toadz listed in the proposal. Handling could be added into the pass-though contract, but at this point why not take the simplest route forward and donate directly to Unchain Ukraine?

In addition, I’m somewhat unsure of the DAO’s appetite for further donation as 100 ETH has already been donated in proposal 42.

Hey @solimander,

As you wrote, we could handle the case of somebody donating more than the DAO for one of the toadz in the new contract. In this case, the DAO will not spend the money on this toad. If this really happens, then it is a good thing, meaning that somebody else already donated these funds :slight_smile:

The ultimate goal is to raise more funds for Ukraine. If the funds go through the Rescue Toadz project (instead of going directly to Unchain), we will create incentives for other people to donate more as well. The idea is that NounsDAO donating will lead to more donations down the road.

I realize that NounsDAO has already made a very generous donation, but I think it will be worth it creating a proposal on this.

Okay, I’d be happy to review the pass-through contract when ready. Unsure how the DAO will act on this one, though there’s only one way to find out :slightly_smiling_face:

Thank you! I’ll work on the pass-through contract and will get your proposal simulation running to make sure the proposal passes.

One question would be where to send the NFTs? Which DAO wallet is the best one for this?

They can be forwarded to the Nouns DAO executor in the onERC1155Received hook.

Hey, I now have a draft of the contract, but the Nouns DAO executor seems to not be able to receive an ERC-1155 token. Is there another address where I can send the tokens?

I’m testing on Rinkeby using the following address for the Nouns DAO executor: 0x6F3940820288855418B7ef8E33a2eC23d9DeD59B

My current code is here: RescueToadzNounsExecutor | Address 0xAA7144e4b8a240DA0e02e58205b4b9DF57B0F097 | Etherscan

Ah right, forgot ERC1155 does not expose a function to transfer without the acceptance check.

While it’d probably be acceptable for the Nounder’s multisig to accept them, how about we leave them in the pass-through contract instead. You can expose a function that can be called by the Nouns DAO executor to transfer them if ever desired. I think this would be beneficial as it’d lower the proposal execution cost.

OK, this makes sense. So I’ll leave them in the passthrough contract and create a function that can only be called by the Nouns DAO executor to send them to an arbitrary address.

1 Like

Hey,

I now prepared a smart contract that addresses all the execution risks from your report.

  • Unavoidable REVERTs #1 - as discussed above, the idea is to use a passthrough contract that calls the Rescue Toadz and receives the ERC-1155 tokens. The passthrough contract offers a function for the Nouns DAO to then transfer the ERC-1155 tokens to another wallet as a second (optional step).
  • Possible REVERTs #1 - the proposed toadz are already minted
  • Possible REVERTs #2 - the passthrough contract checks if the price has been increased before the proposal is executed and will just do nothing if this is the case, so the transaction will not fail.
  • Minor #1 - renounced the contract ownership, so it cannot be paused anymore

The passthrough contract is currently deployed on the Rinkeby testenet here: 0x08b38ada53ad304e574b76b258f27fe87bfef500. When deploying to mainnet I will change the Nouns wallet to the Nouns DAO Executor (0x0bc3807ec262cb779b38d65b38158acc3bfede10).

@solimander - thanks again for your effort and detailed analysis of the problems. Could you please take a look at the contract, before I deploy it to mainnet so I can do some changes if required? It is quite simple.

No problem! Upon review, there is one more blocking issue. If lastTokenPrice is greater than msg.value, the unspent funds must be returned to the DAO. Otherwise, they’ll be stuck in the pass-through contract forever.

Oh, you are totally right! Sorry, for missing that…

Here is the corrected contract on Rinkeby: 0x0937b0665418FAe52441d07bed272F5719Dd2111.

If this is fine now, I’ll deploy to mainnet and create the proposal again with the help of @Noun219.

No worries! Looks good to me :slightly_smiling_face:

1 Like

So is this now ready for minting? I am very excited about this project!

Hey @KoroMonjya, yes the project is live and you can both mint a toad or donate for an existing one and get it from its current owner :slight_smile: