<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by IndyZa on Medium]]></title>
        <description><![CDATA[Stories by IndyZa on Medium]]></description>
        <link>https://medium.com/@indyza?source=rss-6e432ea1711f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*kTsPW9plU2EX4rZOeh-5nA.jpeg</url>
            <title>Stories by IndyZa on Medium</title>
            <link>https://medium.com/@indyza?source=rss-6e432ea1711f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 01:38:34 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@indyza/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Concave Presale Contract Review]]></title>
            <link>https://medium.com/@indyza/concave-presale-contract-review-da50811ea771?source=rss-6e432ea1711f------2</link>
            <guid isPermaLink="false">https://medium.com/p/da50811ea771</guid>
            <category><![CDATA[presale-contract]]></category>
            <category><![CDATA[contract-review]]></category>
            <category><![CDATA[crypto]]></category>
            <category><![CDATA[concave]]></category>
            <dc:creator><![CDATA[IndyZa]]></dc:creator>
            <pubDate>Fri, 04 Feb 2022 22:19:11 GMT</pubDate>
            <atom:updated>2022-02-04T22:41:00.066Z</atom:updated>
            <content:encoded><![CDATA[<p>Review Date: 4 Feb 2022 15:12 UTC</p><p><em>Disclaimer: This is </em><strong><em>not an audit</em></strong><em> of any kind. Please do not call my code review an audit. These reviews are for entertainment &amp; education purpose only and are not financial advice.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Wc-47EU_irj-Xyjn.jpg" /><figcaption>Image by <a href="https://discord.gg/olympians">Olympians</a></figcaption></figure><h3>Basic Information</h3><p><strong>Presale/aCNV Token Contract address</strong>: <a href="https://etherscan.io/address/0x6ff0106d34feee8a8acf2e7b9168480f86b82e2f#code">https://etherscan.io/address/0x6ff0106d34feee8a8acf2e7b9168480f86b82e2f#code</a></p><p><strong>Treasury/Owner Address (Gnosis Multi-sig)</strong>: <a href="https://etherscan.io/address/0x226e7af139a0f34c6771deb252f9988876ac1ced#code">https://etherscan.io/address/0x226e7af139a0f34c6771deb252f9988876ac1ced#code</a></p><h3>Interesting Points</h3><p>Note: Treasury Address = Owner Address</p><p>1. The contract does not use a traditional Ownable implementation library. Still, it is technically <strong>owned by the treasury address</strong> with a custom implementation. (Can technically renounce and transfer ownership)</p><p>onlyConcave modifier is using similar to traditional onlyOwner .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/782/1*vW76JgTQiBySCTssS6RI5w.png" /><figcaption>onlyConcave modifier</figcaption></figure><p>2. Presale logic is merged into the token contract.</p><p>3. <strong>Owner’s address</strong> is a Gnosis Multi-Sig wallet with <strong>3/5,</strong> meaning 3 signers out of 5 signer addresses need to confirm the transaction.</p><p><strong>5 Signer Address consist</strong> of<br><strong>Wallet #1</strong> :–<br><a href="https://etherscan.io/address/0xfE5Ae271c659092B15ebb8c17CC3d6a250895eAE">0xfE5Ae271c659092B15ebb8c17CC3d6a250895eAE</a> (~25 days old, 6 txn)<br>Funded by <a href="https://etherscan.io/address/0x48ae900e9df45441b2001db4da92ce0e7c08c6d2">0x48ae900e9df45441b2001db4da92ce0e7c08c6d2</a> which is funded by <a href="https://etherscan.io/address/0x09e6f1bcb006925b9390cf72c07544018145dc25">0x09e6f1bcb006925b9390cf72c07544018145dc25</a> which is fund by another 2 layer deep address and originally <a href="https://etherscan.io/tx/0x98289fe7bf8747b629fb07233d1c27fcf675118dc329ac09901af7199e3dc2f2">funded</a> by <a href="https://etherscan.io/address/0x00192fb10df37c9fb26829eb2cc623cd1bf599e8">2Miners: PPLNS</a> (~500 days ago)</p><p><strong>Wallet #2</strong> :–<br><a href="https://etherscan.io/address/0x8142A16AC275bD6b932967A986948405C9dF8335">0x8142A16AC275bD6b932967A986948405C9dF8335</a> (~22 days old, 10 txn)<br>Funded by <a href="https://etherscan.io/address/0x09e6f1bcb006925b9390cf72c07544018145dc25">0x09e6f1bcb006925b9390cf72c07544018145dc25</a> which is fund by another 2 layer deep address and originally <a href="https://etherscan.io/tx/0x98289fe7bf8747b629fb07233d1c27fcf675118dc329ac09901af7199e3dc2f2">funded</a> by <a href="https://etherscan.io/address/0x00192fb10df37c9fb26829eb2cc623cd1bf599e8">2Miners: PPLNS</a> (~500 days ago)</p><p><strong>Wallet #3</strong> :–<br><a href="https://etherscan.io/address/0x7D3Fc9625cF9cA6CB66FAF80BE736aCfD6839A56">0x7D3Fc9625cF9cA6CB66FAF80BE736aCfD6839A56</a> (~24 days old, 15 txn)<br>Funded by <a href="https://etherscan.io/address/0x80fa0866bbbab5c2aa0293cbdb0aaefcdec536ca">hemmi.eth</a> which is fund by 2 layer deep address and originally <a href="https://etherscan.io/tx/0x445a5eebd25e0900788fc1d47fe12a09a05905ed3f58034ac562ce5d93cbc554">funded</a> by <a href="https://etherscan.io/address/0x2b5634c42055806a59e9107ed44d43c426e58258">KuCoin</a> (~660 days ago)</p><p><strong>Wallet #4 </strong>:–<br><a href="https://etherscan.io/address/0x6fF51547f69d05d83a7732429cfe4ea1E3299E10">0x6fF51547f69d05d83a7732429cfe4ea1E3299E10</a> (~16 days old, 17 txn)<br>Funded by <a href="https://etherscan.io/address/0x676aa217238a774baa609c30030f6e1d3401a8dc">0x676aa217238a774baa609c30030f6e1d3401a8dc</a> which is funded by <a href="https://etherscan.io/address/0xc5259cc500564de27ca78bbc0fac4727df72c43d">arondight.eth</a> whic is fund by more than 4 layer deep address and is originaly <a href="https://etherscan.io/tx/0x017dccc26da583bd57cfb11fb6991973df7d48bf89e1d7ab17020ebecbdc7317">funded</a> by <a href="https://etherscan.io/address/0x51836a753e344257b361519e948ffcaf5fb8d521">Indodax 1</a> (~900 days ago)</p><p><strong>Wallet #5 </strong>:–<br><a href="https://etherscan.io/address/0x27451e51ACB426D2C9cb926f0597D2e858758eb3">0x27451e51ACB426D2C9cb926f0597D2e858758eb3</a> (~21 days old, 5 txn) Funded by <a href="https://etherscan.io/address/0x7d3fc9625cf9ca6cb66faf80be736acfd6839a56">0x7d3fc9625cf9ca6cb66faf80be736acfd6839a56</a> which is funded by <a href="https://etherscan.io/address/0x80fa0866bbbab5c2aa0293cbdb0aaefcdec536ca">hemmi.eth</a> which is fund by 2 layer deep address and originally <a href="https://etherscan.io/tx/0x445a5eebd25e0900788fc1d47fe12a09a05905ed3f58034ac562ce5d93cbc554">funded</a> by <a href="https://etherscan.io/address/0x2b5634c42055806a59e9107ed44d43c426e58258">KuCoin</a> (~660 days ago)</p><blockquote>In short, 2 wallet (Wallet #1 and Wallet 2) are funded by the same address which is originally fund by an <strong>anonymous miner</strong> and another 2 wallet (Wallet #3 and Wallet #5) is funded by the same address.<br> <br>This means that a total of 2 wallet, Wallet #1 and Wallet #2, is<strong> transactionally funded by same anonymous miner</strong>. I would highly suggest user to always confirm if the wallet is the designated party. This is to <strong>avoid 3 wallet control by 1 person scenario which is just enough for this 3/5 multi-sig policy.</strong></blockquote><blockquote>User should always check, confirm and identify with the project on who is holding the multi-sig to avoid ruggable scenarios.</blockquote><p>4. The owner has a couple of exclusive function that is can be use at <strong>any time</strong>.</p><p>These consist of<br>- <strong>update the price</strong> of aCNV and <strong>update whitelist user and allocation</strong> via Merkle Root with setRound function<br>- <strong>mint unlimited</strong> amount of aCNV with manage function<br>- <strong>set the max supply</strong> of the token to any amount with manageSupply function<br>- <strong>pause transfer</strong> for the token to all user with setTransfersPaused function</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/904/1*jkNurnKV6RBuGvFGHdDwkw.png" /><figcaption>setRound function</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5HSDcBiAfBEEMwPvCH51Tg.png" /><figcaption>manage, manageSupply, setTransfersPaused function</figcaption></figure><p>5. mint function allow user to mint aCNV in exchange for DAI or FRAX.</p><p>The user can only buy if<br>- The token pledge is FRAX or DAI<br>- User have the correct proof for the Merkle Root<br>- Mint amount does not exceed total supply or max user allocation</p><p>When the user mint, the set amount of DAI or FRAX is <strong>sent from the user to the owner</strong>. The contract then mints aCNV to the user at the rate of 50 DAI or FRAX per aCNV. The contract then records the amount that the user buy and the total aCNV purchase.</p><blockquote>By using Merkle Tree to confirm address and allocation, it is<strong> impossible to know on-chain who is whitelisted</strong>, hence the <strong>low transparency</strong> in exchange of lower gas to set up whitelist user.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KjlVXAvS3XocJJtjbisO4g.png" /><figcaption>mint function</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ua3cGDeIzeCKtl59_QF3xQ.png" /><figcaption>_purchase function</figcaption></figure><p>6. mintWithPermit function is the same as mint function but uses ERC20’s permit function to include a specific spending amount without the need to do approval. This function only supports DAI.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tdpSGWyZhI8MD5mdWxPesg.png" /><figcaption>mintWithPermit function</figcaption></figure><p>7. rescue function can only be used by the owner at any time to transfer any token at maxed amount from the contract to the owner.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ukK9Yk3CpMHzIqobgx7_xQ.png" /><figcaption>rescue function</figcaption></figure><h3>Closing Thought</h3><ol><li>This contract is a contract where all minted funds are sent to the owner. The owner address is a 3/5 multi signature wallet contract.<br><strong>The multi-sig </strong>can risk in multiple ways:<br>- risk in a <strong>stale situation where the funds stuck</strong> because 3 addresses does not approve for the transaction<br>(If implemented correctly, the risk substantially is lower)<br>- risk of <strong>3</strong> <strong>addresses belong to 1 person</strong> which make multi-sig a normal wallet (2 addresses are funded by 2Miners (anonymous), which may belong to one of the 3 other addresses which 2 of them is also funded by the same address)<br>- risk in of 3 addresses <strong>conspiring for illicit/bad decision </strong>such as rug-pulling (If implemented correctly, the risk substantially is lower)<br> <br>So <strong>ONLY INVEST IF YOU TRUST ALL OF THE MULTI-SIG ADDRESS.</strong></li><li>There is a risk of <strong>unlimited minting</strong> <strong>of aCNV </strong>token by the token owner which is a multi-sig. This may cause soft-rug in the future.<br>[<strong>Suggest</strong> user to check who the multi-sig signer is]</li><li>There is a risk of <strong>over allocation of whitelist</strong> since the owner have the ability to get larger allocation with Merkle Root update and it is impossible to prove on-chain.<br>[<strong>Suggest</strong> user to check the allocation amount executed in the contract or multi-sig.]</li><li>There is a risk of <strong>funds stuck</strong> due to multi-sig inactivity since there is no cancel or refund functionality in the contract.</li><li>Overall this is a simple contract which depends highly on the multi-sig decision with the risk mention above.</li></ol><h3>Possible Rug Route</h3><p>Here we demonstrate a possible way to <strong>hard-rug</strong> with this contract</p><ol><li>Let people mint aCNV in exchange of DAI or FRAX via mint function because all funds go to owner address.</li><li>If 3 wallets belong to one person, the wallet is treated as a normal wallet. That person then transfers all funds out of the multi-sig wallet.<br>[Note: Need consent from 3/5 Multi-sig]</li><li>The product is not deployed.</li></ol><p>Here we demonstrate a possible way to <strong>soft-rug</strong> with this contract</p><ol><li>Let people mint aCNV in exchange of DAI or FRAX via mint function because all funds goes to owner address.</li><li>Deploy product normally along with aCNV to CNV claim as well as CNV-DAI LP or CNV-FRAX LP</li><li>Owner use <strong>unlimited minting</strong> via aCNV token minting and exchange it to CNV and dump CNV to the market.<br>[Note: Need consent from 3/5 Multi-sig]</li></ol><p>Here we demonstrate a possible way to <strong>stuck-rug</strong> with this contract</p><ol><li>Let people mint aCNV in exchange of DAI or FRAX via mint function because all funds goes to owner address.</li><li>Something happen and 3 of the signer address in multi-sig refuse to approve for transaction.<br>[Hard to happen for 3/5 multi-sig when set up properly]</li><li><strong>Fund stuck forever</strong> in the multi-sig wallet.</li></ol><p>If this is helpful to you, you can <strong>tip</strong> me here</p><h3>Tip Address</h3><p><strong>[</strong>ERC20/BSC/AVAX(C-chain)/Polygon/FTM]<br>0x1d8377aE35C61F36781Ce3A33523EB88E12375C6</p><p><strong>Follow me in Twitter</strong>: <a href="https://twitter.com/indyza_">https://twitter.com/indyza_</a></p><p><strong>Join Olympians Discord for discussion and code review request in (#</strong>🛠│code-talk): <a href="https://discord.gg/ucQwJZEmwa">https://discord.gg/ucQwJZEmwa</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=da50811ea771" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Boundless Presale Contract Review]]></title>
            <link>https://medium.com/@indyza/boundless-presale-contract-review-c63b3945a504?source=rss-6e432ea1711f------2</link>
            <guid isPermaLink="false">https://medium.com/p/c63b3945a504</guid>
            <category><![CDATA[presales]]></category>
            <category><![CDATA[boundless]]></category>
            <category><![CDATA[contract-review]]></category>
            <category><![CDATA[dao]]></category>
            <category><![CDATA[crypto]]></category>
            <dc:creator><![CDATA[IndyZa]]></dc:creator>
            <pubDate>Tue, 01 Feb 2022 18:13:56 GMT</pubDate>
            <atom:updated>2022-02-01T18:15:34.609Z</atom:updated>
            <content:encoded><![CDATA[<p>Review Date: 1 Feb 2022 15:12 UTC</p><p><strong>Special Thanks</strong><br>Proofreading: Checkmate</p><p><em>Disclaimer: This is </em><strong><em>not an audit</em></strong><em> of any kind. Please do not call my code review an audit. These reviews are for entertainment &amp; education purpose only and are not financial advice.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Rwr3LutbRq1eW_Be.png" /><figcaption>Image by <a href="https://discord.gg/olympians">Olympians</a></figcaption></figure><h3>Basic Information</h3><p><strong>Contract Address</strong>: <a href="https://bscscan.com/address/0xf1e6cab36775082e0aa9a90081d5d93bf71c85da#code">https://bscscan.com/address/0xf1e6cab36775082e0aa9a90081d5d93bf71c85da#code</a></p><p><strong>Owner (Gnosis Multi-Sig Contract)</strong>: <a href="https://bscscan.com/address/0x718449d56E0896a1C3aE54a8F285c8c76576aFa4#code">https://bscscan.com/address/0x718449d56E0896a1C3aE54a8F285c8c76576aFa4#code</a></p><p><strong>preBOUND Token Address</strong>: <a href="https://bscscan.com/address/0x3e6d7ac44a0ac8a99b0d8248fc6e9e5f5a98cfb6#code">https://bscscan.com/address/0x3e6d7ac44a0ac8a99b0d8248fc6e9e5f5a98cfb6#code</a></p><blockquote>Note: The contract address is sent to me from the team prior to the site announcement</blockquote><h3>Interesting Points</h3><p>1. Contract ownership is <strong>not</strong> renounced and is held by the owner.</p><p>2. <strong>Owner’s address</strong> is a Gnosis Multi-Sig wallet with <strong>5/5,</strong> meaning 5 signer out of 5 signer address need to confirm the transaction.</p><p>These are the 5 Address<br>- <a href="https://bscscan.com/address/0x2BE2D9A2eeC0941Dc25155a606A489EFA3207D73">0x2BE2D9A2eeC0941Dc25155a606A489EFA3207D73</a><br>- <a href="https://bscscan.com/address/0x3487eA2Ab74cf3E3e4B5667E8519E705248200dF">0x3487eA2Ab74cf3E3e4B5667E8519E705248200dF</a><br>- <a href="https://bscscan.com/address/0x53C0dD83711231D2e631ABe32C247D546EDd669C">0x53C0dD83711231D2e631ABe32C247D546EDd669C</a><br>- <a href="https://bscscan.com/address/0xC1f2154ea0B0E5779Ff84bb11A5ed209Fd0741DF">0xC1f2154ea0B0E5779Ff84bb11A5ed209Fd0741DF</a><br>- <a href="https://bscscan.com/address/0xb4EeAb518A61b7B09AA54c024De4c4447DC7cEE6">0xb4EeAb518A61b7B09AA54c024De4c4447DC7cEE6</a></p><p>Since <strong>I’m in the multi-signature</strong> I can confirm the following party are in the multi-signature:<br>- 4 Addresses from Boundless Team (Shadow, Shadow’s Partner, eagle69, hugh_crypto_jass)<br>- 1 Address from IndyZa (Me) — 3rd Party</p><p>3. There are <strong>constant values</strong> that can not be changed:<br>- preBOUND token address (preBOUND) = <a href="https://bscscan.com/address/0x3e6d7ac44a0ac8a99b0d8248fc6e9e5f5a98cfb6">0x3e6d7ac44a0ac8a99b0d8248fc6e9e5f5a98cfb6</a><br>- BUSD token (BUSD) = <a href="https://bscscan.com/address/0xe9e7cea3dedca5984780bafc599bd69add087d56">0xe9e7cea3dedca5984780bafc599bd69add087d56</a><br>- Sales Price (salePrice) = 4.8 BUSD per preBOUND or 4800000000000000000<br>- Start Sales time (saleStartTime) = 2 Feb 22, 12.00 UTC or 1643803200<br>- 1st Allocation increase time (maxAllotmentResetDoubleTime) = 3 Feb 22, 12.00 UTC or 1643889600<br>- 2nd Allocation increase time (maxAllotmentResetTripleTime) = 4 Feb 22, 0.00 UTC or 1643932800<br>- End Sales time (saleEndTime) = 4 Feb 22, 12.00 UTC or 1643976000<br>- Total preBOUND offer in presale (initialOfferingAmount) = 50000 preBOUND or 50000000000000</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1004/1*cuVCVoZsslYlzwA-BfXhVQ.png" /><figcaption>Contract Creation function (constructor) in Presale Contract</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9HWNTHowEoELcQEZOxy0FA.png" /><figcaption>initialize function in Presale Contract</figcaption></figure><p>4. whitelistBuyers function can only be used by the owner <strong>before the presale starts</strong>. This allow the owner to add user to the whitelist in batches.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/934/1*qyEBRvU8yBQZY2Getx4J7A.png" /><figcaption>whitelistBuyers function in Presale Contract</figcaption></figure><p>5. purchaseBOUND function is a function that allows the user to exchange BUSD for preBOUND.</p><p>The user can only buy if<br>- Presale has started (After 2 Feb 22, 12.00 UTC)<br>- Presale has not ended (Before 4 Feb 22, 12.00 UTC)<br>- Presale is not finalized<br>- User is whitelisted<br>- The amount bought doesn’t exceed the current allocation</p><p>When the user deposit, the set amount of BUSD is sent from the user to the contract. The contract then mints preBOUND to the user at the rate of 4.8 BUSD per preBOUND. The contract then records the amount of preBOUND that the user purchased.</p><p>The users have max allocation started at 100.603621730 preBOUND per user. The user max allocation will increase<br>to 2x (201.20724346 preBOUND) after 3 Feb 22, 12.00 UTC <br>to 3x (301.81086519 preBOUND) after 4 Feb 22, 0.00 UTC<br>The user can buy more after the allocation increase.</p><blockquote>Based on the mechanic, all the user can buy in the first 24 hour but after that the presale <strong>become FCFS</strong> because the total allocation for all user exceed the total amount.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c64fuvpisYi2oDHTYQU1bw.png" /><figcaption>purchaseBOUND function in Presale Contract</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/842/1*Pu0a8h7SguIldfUxvMuGuA.png" /><figcaption>maxAllotmentPerBuyer function in Presale Contract</figcaption></figure><p>6. transferExpenditure can only be use by the owner when the protocol is finalized. Owner can used this function to send BUSD to a specific address at a designated amount. The contract also records how much fund is being spent (send). This affects the user’s refundable amount.</p><p>The finalized phase can be entered by the owner calling the finalize function.</p><blockquote>In short, this function can be used as a <strong>spending transfer</strong> where the owner can spend the presale funds while <strong>the user can still be refunded</strong>. <br> <br>I<strong>f this function is used properly,</strong> the owner doesn’t need to send the fund to the multi-sig while maintaining the ability to expense fund. The fund will always stay in the presale contract for refund.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tvUdThnXkm0ncdggoNwlFQ.png" /><figcaption>transferExpenditure, finalize function in Presale Contract</figcaption></figure><p>7. withdrawIfCancelled function allows the user to refund BUSD with purchased preBOUND.</p><p>This can only be used if<br>- Presale is finished<br>- 30 day after the presale has ended ( saleCancellationBuffer) or the owner cancel the presale<br>- User have the amount of preBOUND that they invested in this contract</p><p>When the user uses this function, the user sends preBound to the contract at the total amount invested in the presale. The contract then send BUSD to the user. The amount of BUSD the user receive is <em>proportional</em> to the amount of BUSD remaining in the contract.</p><p><strong>Example for proportion refund</strong><br>The user invest 1,000 BUSD for 250 preBOUND. <br>There are 100,000 BUSD raised in presale and 40,000 is spent, so 60,000 BUSD remaining which is 60% of 100,000 BUSD. <br>The user can use this function to refund 250 preBOUND for 600 BUSD (60% of 1,000 BUSD).</p><blockquote>Users can <strong>automatically</strong> use this function after 30 days without approval from the owner to <strong>refund</strong> back to BUSD, amount refund is proportional to the fund left in the presale.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QR3UfhBdx6MzWiyc0ITnSQ.png" /><figcaption>withdrawIfCancelled function in Presale Contract</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/744/1*5ER_Otiv5RYF93XYIAVkrQ.png" /><figcaption>saleCancellationBuffer variable in Presale Contract</figcaption></figure><p>8. cancelPresale function can only be used by the owner at <strong>anytime</strong>. When the function is used, it sets the buffer to 0, and the refund will start right away after the presale ends. This cancellation doesn’t cancel the ongoing presale.</p><p>The owner can also use setupSaleCancellationBuffer function anytime to set a new buffer to set the delay for refunding.</p><blockquote>The owner, multi-sig, can use setupSaleCancellationBuffer to <strong>any number </strong>meaning it can be set to a very high number making refund impossible.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/716/1*ZtfxBCh5BTdzbTjgMTs9LQ.png" /><figcaption>cancelPresale function in Presale Contract</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mDvaqjypV5tSOoVjPg0UZw.png" /><figcaption>setupSaleCancellationBuffer in Presale Contract</figcaption></figure><p>9. The owner, 5/5 multi-sig, has control over the mint function for preBOUND token contract. This means that the owner can <strong>mint an unlimited amount</strong> of token at anytime.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EhtUqLTdzJyJ88kevrLIng.png" /><figcaption>mint function in preBOUND token contract</figcaption></figure><h3>Closing Thought</h3><ol><li>This contract is a contract where the owner can withdraw all deposit BUSD from the contract. The wallet address is a 5/5 multi-signature wallet contract. <strong>The multi-sig </strong>can risk in multiple ways:<br>- risk of 5 address <strong>conspiring for illicit/bad decision </strong>such as rug-pulling<br> <br>So <strong>ONLY INVEST IF YOU TRUST THE TEAM AND 3RD PARTY.<br></strong>(3rd Party is me.)</li><li>There is a risk of <strong>unlimited minting of preBOUND </strong>token by the owner, 5/5 multi-sig, which can result in supply inflation.<br>(3rd party will need to consent for this action.)</li><li><strong>Refund are controlled in a countdown timer function of 30 days after presale end </strong>so there is no need for any multi-sig consent for refund. All expenditure can happen without funds going out of presale contract. <br>But there are <strong>risk of owner extending timer</strong> to a very long time.<br>(3rd party will need to consent for this action.)</li><li>There is a risk of only getting a <strong>partial</strong> <strong>refund</strong> due to expenditure of presale in the project.<br>(3rd party will need to consent for each expenditure.)</li><li>There is <strong>no BOUND token deployed, </strong>which will be used as the official token, at the time of this writing. Users will be at risk of <strong>unlimited minting</strong> unless the minting is assigned to a proper multi-sig policy.</li><li>Overall this is a presale contract with dynamic refund and presale fund expense function with the risk mentioned above.</li></ol><h3>Possible Rug Route</h3><p>Here we demonstrate a possible way to <strong>hard-rug</strong> with this contract</p><ol><li>Let people buy preBOUND in exchange for BUSD with purchaseBOUND function.</li><li>Owner uses transferExpenditure to withdraw all BUSD to the team address.<br><strong>(The team will need to convince the 3rd Party)</strong></li><li>Owner never deploys/set up any liquidity or contract.</li></ol><p>Here we demonstrate a possible way to <strong>soft-rug</strong> with this contract</p><ol><li>Let people buy preBOUND in exchange for BUSD with purchaseBOUND function.</li><li>Deploy OHM fork normally</li><li>Owner with 5/5 policy use <strong>preBOUND/BOUND </strong>token minting (mint).<br><strong>(The team will need to convince the 3rd Party)</strong></li></ol><blockquote><em>Multi-sig Note: that convince the 3rd Party</em><strong><em> </em></strong><em>will not apply after launch if there is a handover of ownership of BOUND token back to the team</em></blockquote><p>Here we demonstrate a possible way to <strong>stuck-rug</strong> with this contract</p><p><em>- No possible way to create stuck rug</em></p><p>If this helpful to you, you can <strong>tip</strong> me here</p><h3>Tip Address</h3><p><strong>[</strong>ERC20/BSC/AVAX(C-chain)/Polygon/FTM]<br>0x1d8377aE35C61F36781Ce3A33523EB88E12375C6</p><p><strong>Follow me in Twitter</strong>: <a href="https://twitter.com/indyza_">https://twitter.com/indyza_</a></p><p><strong>Join Olympians Discord for discussion and code review request in (#</strong>🛠│code-talk): <a href="https://discord.gg/ucQwJZEmwa">https://discord.gg/ucQwJZEmwa</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c63b3945a504" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Samecoin Presale Contract Review]]></title>
            <link>https://medium.com/@indyza/samecoin-presale-contract-review-d9bb667ad049?source=rss-6e432ea1711f------2</link>
            <guid isPermaLink="false">https://medium.com/p/d9bb667ad049</guid>
            <category><![CDATA[contract-review]]></category>
            <category><![CDATA[samecoin]]></category>
            <category><![CDATA[presales]]></category>
            <category><![CDATA[ohmfork]]></category>
            <category><![CDATA[crypto]]></category>
            <dc:creator><![CDATA[IndyZa]]></dc:creator>
            <pubDate>Tue, 25 Jan 2022 19:16:33 GMT</pubDate>
            <atom:updated>2022-01-25T19:16:33.543Z</atom:updated>
            <content:encoded><![CDATA[<p>Review Date: 25 Jan 2021 15:47 UTC</p><p><strong>Special Thanks</strong><br>Proofreading: Checkmate</p><p><em>Disclaimer: This is </em><strong><em>not an audit</em></strong><em> of any kind. Please do not call my code review an audit. These reviews are for entertainment &amp; education purpose only and are not financial advice.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zSAK8mUNMOYUy6k7hr6-cw.png" /><figcaption>Image by <a href="https://discord.gg/olympians">Olympians</a></figcaption></figure><h3>Basic Information</h3><p><strong>Contract Address</strong>: <a href="https://bscscan.com/address/0xb6f8497ec87116442fccc7a8c619a83a63b26d76#code">https://bscscan.com/address/0xb6f8497ec87116442fccc7a8c619a83a63b26d76#code</a></p><p><strong>Owner/DAO Address (Normal Wallet)</strong>: <a href="https://bscscan.com/address/0xe6d8c9d4974566428842b762d8ccb37988d448cc">https://bscscan.com/address/0xe6d8c9d4974566428842b762d8ccb37988d448cc</a></p><p><strong>SAME Token Address </strong>(Unverified Contract): <a href="https://bscscan.com/address/0xf3392f5689d7b070525efebaf235cc984fb90173#code">https://bscscan.com/address/0xf3392f5689d7b070525efebaf235cc984fb90173#code</a></p><h3>Interesting Points</h3><p>1. The presale contract ownership is <strong>not</strong> renounced.</p><p>2. initialize function can only be used by the owner at anytime. The owner <strong>can change many variable’s</strong> values with no constraint.</p><p>These adjustable variable consist of<br>- Same token address (Same) = <a href="https://bscscan.com/address/0xf3392f5689d7b070525efebaf235cc984fb90173">0xf3392f5689d7b070525efebaf235cc984fb90173</a><br>- Token sales price (salePrice) = 4000000000000000000 or 4 USDT per SAME token<br>- DAO Address (DAOAddress) = <a href="https://bscscan.com/address/0xe6d8c9d4974566428842b762d8ccb37988d448cc">0xe6d8c9d4974566428842b762d8ccb37988d448cc</a><br>- Minimum purchase amount (minAmount) = 1000000000000000000000 or 1000 USDT<br>- Tier 1 Maximum purchase amount (maxAmount) = 2000000000000000000000 or 2000 USDT<br>- Tier 2 Maximum purchase amount (twoMaxAmount) = 1500000000000000000000 or 1500 USDT<br>- Total purchase amount for the presale (totalAmount) = 300000000000000000000000 or 300,000 USDT<br>- Stable coin for purchasing (uAddress) = USDT or <a href="https://bscscan.com/address/0x55d398326f99059ff775485246999027b3197955">0x55d398326f99059ff775485246999027b3197955</a><br>- Start presale time (startTime) = 1643014800 or January 24, 2022 9:00 UTC<br>- End presale time (endTimestamp) = 1643187600 or January 26, 2022 9:00 UTC</p><p>Both start and end presale time can also be adjust by setStartTimestamp and setEndTimestamp function.</p><blockquote>This means that the owner <strong>can adjust</strong> price, traded token, min/max buy per user, whitelist start and end time at any time.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oEhptga2j00zwAjmBFI34Q.png" /><figcaption>initialize function in Presale Contract</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/970/1*DaWI-oGRKBP8fEIi-PmajQ.png" /><figcaption>setEndTimestamp, setStartTimestamp function in Presale Contract</figcaption></figure><p>3. whiteListBuyerOne and whiteListBuyerTwo functions can only be used by the owner at <strong>anytime</strong>. The owner can whitelist user as tier 1 or tier 2 which have different max quota for presale.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A99Zq-In6s1EHXd_k_Er5Q.png" /><figcaption>whiteListBuyersOne, whiteListBuyersTwo function in Presale Contract</figcaption></figure><p>3. purchaseSame function can be use by the user to exchange USDT for SAME.</p><p>The user can only buy if<br>- Presale has started<br>- Presale has not ended<br>- user is tier 1 or tier 2 whitelist<br>- the amount bought doesn’t exceed the max tier cap (1500 USDT for tier 2 and 2000 USDT for tier 1)<br>- the user has not bought before (Can only buy ONCE)</p><p>When the user deposit, the set amount of USDT is sent from the user to the owner (DAO). The contract then send SAME to the user at the rate of 4 USDT per SAME. The contract then records the amount of USDT that the user purchased.</p><blockquote>User gets SAME token right away, this could mean that this is the actual token at launched which means that it is subject to <strong>Liquidity Sniping</strong> where the project owner can not set starting liquidity price because someone already created the LP.</blockquote><blockquote>The user funds is sent to owner (DAO), <strong>a normal wallet.</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GRnfg3T31-b2DDYvQpdFqg.png" /><figcaption>purchaseSame function in Presale Contract</figcaption></figure><p>4. withdraw function can only be used by the owner. This allows the owner to withdraw any token at full amount from the contract</p><blockquote>This means that a normal wallet (owner) has<strong> full control</strong> of any funds in this presale contract and can withdraw anytime.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/894/1*XAFg-mYf76xx-Z1j857hUw.png" /><figcaption>withdraw function in Presale Contract</figcaption></figure><p>5. SAME Token contract is unverified. It has a <a href="https://bscscan.com/tx/0x1400ffd616141367df0acc0b123d9825f4a073ffaa68b9c0b6d921aacaf19407">signature function</a> for upgradeTo function which is unique to <a href="https://blog.openzeppelin.com/the-transparent-proxy-pattern/"><strong>Transparent Upgradeable Proxy</strong></a> protocol. It is an upgradable contract where you reference a contract source code. The owner can upgrade the contract without changing the proxy address.</p><p>The owner can upgrade the contract or change the logic whenever they want and possibly <strong>without a Timelock.</strong></p><blockquote><em>Imagine the token code are originally safe to trade, then they upgrade/change logic to </em><strong><em>lock the token trade from your wallet</em></strong><em>.</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*udtKoDy-ao4fRTx_r9_kQw.png" /><figcaption>upgradeTo function used in the token contract</figcaption></figure><h3>Closing Thought</h3><ol><li>This contract is a contract where all the funds go to the DAO Address. The DAO Address is a normal wallet, meaning the <strong>owner holds all control of the funds</strong>.<br> <br>So <strong>ONLY INVEST IF YOU TRUST IN THE DEVELOPER.</strong></li><li>There is a <strong>risk of Liquidity Sniping</strong> because all users have SAME token right away after purchase, meaning that someone can create liquidity and the team can’t set the token’s price.</li><li>There is a<strong> transparency risk </strong>because SAME token is not verified.</li><li>There is a <strong>risk of token contract upgrade/migration</strong> which owner can change or replace the entire contract with a different one.<br>There is also <strong>no Timelock</strong> implemented so the upgrade will happen <strong>INSTANTLY</strong> by a normal wallet.<br>This makes it so that a lot of risk can happen such as <strong>infinite minting</strong>, <strong>trade lock, hidden taxes</strong> and <strong>change of trading logic</strong>, including but not limited to block transfer/trading.</li><li>Overall this is a simple presale contract with upgradable token contract without a Timelock with the risk mention above.</li></ol><h3>Possible Rug Route</h3><p>Here we demonstrate a possible way to <strong>hard-rug</strong> with this contract</p><ol><li>Let people buy SAME in exchange for USDT with purchaseSame function because all funds go to owner’s wallet.</li><li>Owner don’t deploy SAME liquidity or OHM fork contract.</li></ol><p>Here we demonstrate a possible way to <strong>soft-rug</strong> with this contract</p><ol><li>Let people buy SAME in exchange for USDT with purchaseSame function because all funds go to owner’s wallet.</li><li>Deploy OHM fork normally as well as SAME-USDT LP</li><li>Owner uses <strong>unlimited minting</strong> with token minting and <strong>locks users from selling</strong> via contract upgrade and gradually dumps minted SAME to the market.</li></ol><p>Here we demonstrate a possible way to <strong>stuck-rug</strong> with this contract</p><ol><li>Let people buy SAME in exchange for USDT with purchaseSame function because all funds go to owner’s wallet.</li><li>Something happen and the owner disappear.</li><li><strong>Fund stuck forever</strong> in the normal wallet.<br>(Hard to happen for normal wallet)</li></ol><p>If this helpful to you, you can <strong>tip</strong> me here</p><h3>Tip Address</h3><p><strong>[</strong>ERC20/BSC/AVAX(C-chain)/Polygon/FTM]<br>0x1d8377aE35C61F36781Ce3A33523EB88E12375C6</p><p><strong>Follow me in Twitter</strong>: <a href="https://twitter.com/indyza_">https://twitter.com/indyza_</a></p><p><strong>Join Olympians Discord for discussion and code review request in (#</strong>🛠│code-talk): <a href="https://discord.gg/ucQwJZEmwa">https://discord.gg/ucQwJZEmwa</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d9bb667ad049" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[blobDAO Presale Contract Mini-Review]]></title>
            <link>https://medium.com/@indyza/blobdao-presale-contract-mini-review-74f275112c43?source=rss-6e432ea1711f------2</link>
            <guid isPermaLink="false">https://medium.com/p/74f275112c43</guid>
            <category><![CDATA[presale-contract]]></category>
            <category><![CDATA[mini-contract-review]]></category>
            <category><![CDATA[crypto]]></category>
            <category><![CDATA[ohmfork]]></category>
            <category><![CDATA[blobdao]]></category>
            <dc:creator><![CDATA[IndyZa]]></dc:creator>
            <pubDate>Fri, 21 Jan 2022 15:11:28 GMT</pubDate>
            <atom:updated>2022-01-21T15:14:52.479Z</atom:updated>
            <content:encoded><![CDATA[<p>Review Date: 21 Jan 2021 14:44 UTC</p><p><em>Disclaimer: This is </em><strong><em>not an audit</em></strong><em> of any kind. Please do not call my code review an audit. These reviews are for entertainment &amp; education purpose only and are not financial advice.</em></p><blockquote><strong><em>Mini-review</em></strong><em> is a contract review in bite size version that mainly</em><strong><em> focus on risk</em></strong><em>. This allow me to review more contract with concise </em><strong><em>risk</em></strong><em>.</em></blockquote><h3>Basic Information</h3><p><strong>Presale Address</strong>: <a href="https://ftmscan.com/address/0x0D73337f1f0Cb07763F80d8C336e949375b1c15F#code">https://ftmscan.com/address/0x0D73337f1f0Cb07763F80d8C336e949375b1c15F#code</a></p><p><strong>Owner Address (Gnosis Multi-sig Wallet 4/4)</strong>: <a href="https://bscscan.com/address/0x46c5a2b0cb26873f72ff249d5323011eb84a048e#code">https://bscscan.com/address/0x46c5a2b0cb26873f72ff249d5323011eb84a048e#code</a></p><p><strong>Wallet Address (Normal Wallet)</strong>: <a href="https://ftmscan.com/address/0x57067832be9f0de3d100c32035c6ad873132bba3">https://ftmscan.com/address/0x57067832be9f0de3d100c32035c6ad873132bba3</a></p><p><strong>pBLOB Token Contract Address</strong>: <a href="https://ftmscan.com/address/0x6b10533c14f479a5f4dc2fe735c1d96305f888b7#code">https://ftmscan.com/address/0x6b10533c14f479a5f4dc2fe735c1d96305f888b7#code</a></p><h3>Risk</h3><ol><li><strong>Risk of 1 people own 4 signer in multi-sig wallet with 4/4 policy</strong><br>3 Wallet is an <strong>empty wallet</strong> so there is a possibility that this is all owned by 1 person. (User should check with the team for confirmation)</li><li><strong>Risk of funds stuck forever </strong>[Stuck-rug Possibility]<strong><br></strong>If 1 of the address from the Multi-sig does not agree to withdraw the funds the fund is stuck forever in presale contract.</li><li><strong>Withdrawal Risk </strong>[Hard-rug Possibility]<strong><br></strong>Has <strong>withdraw</strong> all function for owner to take all FTM out (consent from 4/4 multi-sig) using takeTokens function to a <strong>normal wallet</strong> without constraint. Although this contract has a refund function of softCap is not met the risk overwhelm by taketoken function which can call at anytime.</li><li><strong>Unlimited Minting Risk </strong>[Hard-rug Possibility]<br>Wallet address which is a normal wallet can mint as much pBLOB as possible with mint function.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/554/1*3ZTec9Uc23gkIMf7R_zL0A.png" /><figcaption>takeToken function in Presale Contract</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hxb8fJ1A-g_-MQA0MoPpWA.png" /><figcaption>refundMe function in Presale Contract</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/546/1*1GDcC16gnmXlXSvkdBB_cw.png" /><figcaption>mint function in pBLOB token contract</figcaption></figure><p><strong>Multi-sig Signer Addresses</strong><br>- <a href="https://ftmscan.com/address/0x57067832BE9f0de3d100c32035c6AD873132BbA3#internaltx">0x57067832BE9f0de3d100c32035c6AD873132BbA3</a> (&lt;2 days old)<br>- <a href="https://ftmscan.com/address/0x588321283871340d83999A26111eEd635518d340">0x588321283871340d83999A26111eEd635518d340</a> (Empty wallet)<br>- <a href="https://ftmscan.com/address/0xB5DA3dB984BcCe98e3178833e0728bf7bA60153d">0xB5DA3dB984BcCe98e3178833e0728bf7bA60153d</a> (Empty wallet)<br>- <a href="https://ftmscan.com/address/0xD306A1C88e4cB8128D78BD5E55e7eb51F2D0b420">0xD306A1C88e4cB8128D78BD5E55e7eb51F2D0b420</a> (Empty wallet)</p><p>If this helpful to you, you can <strong>tip</strong> me here</p><h3>Tip Address</h3><p><strong>[</strong>ERC20/BSC/AVAX(C-chain)/Polygon/FTM]<br>0xC1f2154ea0B0E5779Ff84bb11A5ed209Fd0741DF</p><p><strong>Follow me in Twitter</strong>: <a href="https://twitter.com/indyza_">https://twitter.com/indyza_</a></p><p><strong>Join Olympians Discord for discussion and code review request in (#</strong>🛠│code-talk): <a href="https://discord.gg/ucQwJZEmwa">https://discord.gg/ucQwJZEmwa</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=74f275112c43" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[PixelDAO Presale Contract Review]]></title>
            <link>https://medium.com/@indyza/pixeldao-presale-contract-review-7486be811b7f?source=rss-6e432ea1711f------2</link>
            <guid isPermaLink="false">https://medium.com/p/7486be811b7f</guid>
            <category><![CDATA[presales]]></category>
            <category><![CDATA[pixeldao]]></category>
            <category><![CDATA[crypto]]></category>
            <category><![CDATA[dao]]></category>
            <category><![CDATA[contract-review]]></category>
            <dc:creator><![CDATA[IndyZa]]></dc:creator>
            <pubDate>Wed, 19 Jan 2022 01:46:01 GMT</pubDate>
            <atom:updated>2022-01-19T01:46:01.944Z</atom:updated>
            <content:encoded><![CDATA[<p>Review Date: 18 Jan 2022 22:33 UTC</p><p><strong>Special Thanks</strong><br>Proofreading: Checkmate</p><p><em>Disclaimer: This is </em><strong><em>not an audit</em></strong><em> of any kind. Please do not call my code review an audit. These reviews are for entertainment &amp; education purpose only and are not financial advice.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*qesH1hyDprYnBVvK.png" /><figcaption>Image by <a href="https://discord.gg/olympians">Olympians</a></figcaption></figure><h3>Basic Information</h3><blockquote>Important: At the moment, Harmony doesn’t support verification on multi-file contracts, so all multi-file contract will not be able to verified and will not show a contract tab.</blockquote><p><strong>Presale Contract Address</strong>: <a href="https://explorer.harmony.one/address/0x113c9a21bb31b02c6e5b2a39feaa15d6b586b4b4?activeTab=0">https://explorer.harmony.one/address/0x113c9a21bb31b02c6e5b2a39feaa15d6b586b4b4</a></p><p><strong>DAO Contract Address </strong>(4/5 Gnosis Multi-sig): <a href="https://explorer.harmony.one/address/0x7411a19aaeb1bc03ee70bc644bf70e8333dc6321?activeTab=0">https://explorer.harmony.one/address/0x7411a19aaeb1bc03ee70bc644bf70e8333dc6321</a></p><p><strong>rPXL Token Address</strong>: <a href="https://explorer.harmony.one/address/0x23a29c94b9541b4ac362c48fce02912244876802?activeTab=7">https://explorer.harmony.one/address/0x23a29c94b9541b4ac362c48fce02912244876802</a></p><p><strong>Owner Address </strong>(Normal Wallet): <a href="https://explorer.harmony.one/address/0x15e04a430f61e4e3cc25183e1f6613f4e7b5fa1b?activeTab=0">https://explorer.harmony.one/address/0x15e04a430f61e4e3cc25183e1f6613f4e7b5fa1b</a></p><blockquote>*All address information is acquire from the PixelDAO official website data <a href="https://pixeldao.finance/protagonist">https://pixeldao.finance/protagonist</a></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AOxe7yJ0x17GrnLzxIt1fQ.png" /><figcaption><a href="https://discord.com/channels/912589961058983956/912589961214165013/932423984518160394">Announcement</a> from PixelDAO Discord Server</figcaption></figure><blockquote>None of the presale and its related contract is verified when writing this. So <strong>all will be interpreted via contract’s bytecode and transaction</strong>.</blockquote><h4>Contract Bytecode</h4><p><strong>Presale Contract</strong><br>Bytecode: <br><a href="https://gist.github.com/indyza-dev/9e6a22dfeacdbbe182e6cdadcb464483">https://gist.github.com/indyza-dev/9e6a22dfeacdbbe182e6cdadcb464483</a><br>Translated Bytecode: <br><a href="https://gist.github.com/indyza-dev/59bc6183a57084494c16ae8ce5c65577">https://gist.github.com/indyza-dev/59bc6183a57084494c16ae8ce5c65577</a></p><p><strong>rPXL Contract</strong><br>*Bytecode can be found in the explorer.<br>Translated Bytecode: <br><a href="https://gist.github.com/indyza-dev/fffa41d6e3bf662d658b2686caf8e97b">https://gist.github.com/indyza-dev/fffa41d6e3bf662d658b2686caf8e97b</a></p><p><strong>DAO Contract</strong><br>*Bytecode can be found in the explorer.<br>Translated Bytecode: <br><a href="https://gist.github.com/indyza-dev/490ccf1b15489e950816c2fbeaea5120">https://gist.github.com/indyza-dev/490ccf1b15489e950816c2fbeaea5120</a></p><h3>Interesting Points</h3><p>1. <strong>All contract is unverified.</strong> This means that the user can not easily see the actual code implementation without decompiling the bytecode and reverse-engineer the function.</p><blockquote>Suggest user to request to see the source-code if the project is open-sourced</blockquote><p>2. Ownership of the presale contract is <strong>not renounced</strong>.<br>Owner of the presale contract is determine by storage block 0 (0x00) in the contract which is equal to 0x00000000000000000000000015e04a430f61e4e3cc25183e1f6613f4e7b5fa1b</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fqc5x710zOLv97TpDCk2nQ.png" /><figcaption>owner() function in Presale Contract (translated bytecode)</figcaption></figure><p>3. There are several notable <strong>constant</strong> value that will not be changed.<br>FRAX Address (func_0B18): <a href="https://explorer.harmony.one/address/0xfa7191d292d5633f702b0bd7e3e3bccc0e633200">0xfa7191d292d5633f702b0bd7e3e3bccc0e633200</a><br>rPXL Address (func_045C): <a href="https://explorer.harmony.one/address/0x23a29c94b9541b4ac362c48fce02912244876802">0x23a29c94b9541b4ac362c48fce02912244876802</a> <br>Price Rate (func_0956) = 19 FRAX per rPXL<br>DAO Address (dao) = <a href="https://explorer.harmony.one/address/0x7411a19aaeb1bc03ee70bc644bf70e8333dc6321?activeTab=0">0x7411a19aaeb1bc03ee70bc644bf70e8333dc6321</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2Dv66JWGCEOLhCb7KG_lMg.png" /><figcaption>func_045C, dao, func_0956 internal function (public variable)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3W6LdQAtrq3OI5mZSWyXGg.png" /><figcaption>func_0B18 internal function (public variable)</figcaption></figure><p>4. 0x2ecb3fec (or Deposit) function can be used by user to exchange FRAX for rPXL.</p><p>The user can only buy if<br>- The user bought before January 20, 2022 0:00 UTC (1642636800) [Data in storage block 4 (0x04)]<br>- The user still have remaining allocation (set by the owner)</p><p>When the user deposit, the set amount of FRAX is sent from the user to the DAO Address (Multi-sig Wallet). The contract then mints rPXL to the user at the rate of 19 FRAX per rPXL. The contract then records the amount of FRAX that the user allocated.</p><blockquote>This means that <strong>all funds</strong> are sent and stored in the <strong>DAO</strong> <strong>multi-sig wallet. </strong>There are currently no treasury contract or dApp.</blockquote><p>Storage Block 4 Data:<br>0x0000000000000000000000000000000000000000000000000000000061e8a600</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/764/1*rcH4gf5Xx7PtvWUrsTq7QA.png" /><figcaption>0x2ecb3fec function signature in Presale Contract (translated bytecode)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UGFV5ZLDK1ggECwwkdGKJg.png" /><figcaption>func_0139 internal function of 0x2ecb3fec in Presale Contract (translated bytecode)</figcaption></figure><p><em>*All comment in the image are my note for easier understanding for the reader</em></p><p>4. 0x331ceae1 (setUserAllocation) function can only be used by the owner at anytime. This allows the owner to set allocation for whitelist users at anytime.</p><blockquote>This means that the owner (<strong>a normal wallet</strong>) can set <strong>ANY user ANY amount of allocations</strong> at anytime without any constraint.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/792/1*EpZxrXuiE-2w2IF6hISuCA.png" /><figcaption>0x331ceae1 function signature in Presale Contract (translated bytecode)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XjIZG11gcr7RcVw6AdfB1g.png" /><figcaption>func_0167 internal function of 0x331ceae1 in Presale Contract (translated bytecode)</figcaption></figure><p><em>*All comment in the image are my note for easier understanding for the reader</em></p><p>5. There is an unused variable within the bytecode called VESTING_DURATION at 259200 (3 days). This suggests either the code is <strong>forked</strong> or the dev didn’t clean unused code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/860/1*jKhts0FTY-PMC1mWwsqI4g.png" /><figcaption>VESTING_DURATION internal function (public variable)</figcaption></figure><p>6. <strong>No PXL claiming with rPXL function exist</strong> in the presale contract suggesting that this will be available later on.</p><p>7. <strong>DAO Address</strong> is a Gnosis multi-sig wallet contract.</p><p>The multi-sig policy is 4/5 meaning that meaning 4 signer out of 5 signer address need to confirm the transaction.</p><p><strong>5 Signer Address consist</strong> of<br><strong>Wallet #1</strong> :–<br><a href="https://explorer.harmony.one/#/address/0xc28339c70054bC22255A74E927a0B9e9A475F224">0xc28339c70054bC22255A74E927a0B9e9A475F224</a> (~113 days old, 1 txn)<br>Funded by <a href="https://explorer.harmony.one/address/0x36a87d1e3200225f881488e4aeedf25303febcae">0x36a87d1e3200225f881488e4aeedf25303febcae</a> (~9 month old) which might funded by Harmony Faucet</p><p><strong>Wallet #2</strong> :–<br><a href="https://explorer.harmony.one/#/address/0x5Dd3542991d34467C8F061E65059191ee331278d">0x5Dd3542991d34467C8F061E65059191ee331278d</a> (~30 days old, 31 txn)<br>Funded by <a href="https://explorer.harmony.one/address/0x9011aa255048d2f6be8add725b27e8f72cb7cf7a">0x9011aa255048d2f6be8add725b27e8f72cb7cf7a</a> which is funded by Binance Wallet</p><p><strong>Wallet #3</strong> :–<br><a href="https://explorer.harmony.one/#/address/0x572aeAD01cb0A6eEB54f408fEf5Fa13bE752Ad77">0x572aeAD01cb0A6eEB54f408fEf5Fa13bE752Ad77</a> (Empty Wallet)</p><p><strong>Wallet #4 </strong>:–<br><a href="https://explorer.harmony.one/#/address/0x5E4a9e25C6fAD5114Ec850cC3fD5A2B02756Df8B">0x5E4a9e25C6fAD5114Ec850cC3fD5A2B02756Df8B</a> (Empty Wallet)</p><p><strong>Wallet #5 </strong>:–<br><a href="https://explorer.harmony.one/#/address/0x8FA1b1C1aE3407D1ceECf28Af46E8bafbff9294F">0x8FA1b1C1aE3407D1ceECf28Af46E8bafbff9294F</a> (&lt; 1 days old, 1 txn) Funded by <a href="https://explorer.harmony.one/address/0x0169e5cdeb55e313483f511e7cbf1e9f9bf9f21d">0x0169e5cdeb55e313483f511e7cbf1e9f9bf9f21d</a> which might be funded by Harmony Faucet</p><blockquote>In short, total of 2 wallets: Wallet #3, Wallet #4 is <strong>an empty wallet. </strong>I would highly suggest user to always confirm if the wallet is the designated party, to <strong>avoid 3 wallet control by 1 person scenario which only need 1 more signer for a 4/5 policy.<br> <br></strong>Also the presale and rPXL contract owners are <strong>not related</strong> to any of these signers</blockquote><blockquote>User should always check, confirm, and identify with the project on who is holding the multi-sig to avoid rugging scenarios.</blockquote><p>8. rPXL token is currently owned by the owner and 2 address contain a minter role which consists of<br>- <a href="https://explorer.harmony.one/address/0x113c9a21bb31b02c6e5b2a39feaa15d6b586b4b4">0x113c9a21bb31b02c6e5b2a39feaa15d6b586b4b4</a> (Presale Contract)<br>- <a href="https://explorer.harmony.one/address/0x55bced613d3808ad869b4e2e1d7ebbcc9b6f09fc">0x55bced613d3808ad869b4e2e1d7ebbcc9b6f09fc</a> (Unused Presale Contract in a single file format)</p><blockquote>The owner <strong>(normal wallet)</strong> and the unused presale contract, which the owner controls, can <strong>unlimited mint </strong>rPXL.</blockquote><blockquote>The owner<strong> has already minted</strong> a total of 800 rPXL directly from the contract (without cost) to themselves (4 txn of 200 token minting)*.</blockquote><p>*Log for rPXL Minting №<a href="https://explorer.harmony.one/tx/0x128ccb3125fbda95678d5f76d209ed8338a0c13237400f139bbd8097392a1a37">1</a>, <a href="https://explorer.harmony.one/tx/0x1f7537f69538bdcd3e4acff01e21d575fd8f4be5aeeb657bc81eec9fcf565e82">2</a>, <a href="https://explorer.harmony.one/tx/0xf38dabd2ca58b5fa9e17c1bc6800071bc224d5a03fcd027d6ca359afe21f6785">3</a>, <a href="https://explorer.harmony.one/tx/0xa686de59d41777836b9ca8c231e57e69e115a89fd5a4e8f49d747972edb206f7">4</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CLm1laN-zyv_jqvPK6ez2g.png" /><figcaption>Owner’s minting rPXL viewed Harmony Explorer</figcaption></figure><h3>Closing Thought</h3><ol><li>This contract sends <strong>all funds</strong> deposited(0x2ecb3fec) from the user directly to the DAO Address. The DAO address is a 4/5 Gnosis multi signature wallet contract.<br><strong>The multi-sig </strong>can risk in multiple ways:<br>- risk in a <strong>stale situation where the funds are stuck</strong> because 2 address does not approve for the transaction<br>- risk of <strong>4 address belonging to 1 person</strong> which make multi-sig a normal wallet (2 address are empty which may belong to one of the signers)<br>- risk of<strong> 4 address</strong> <strong>conspiring for illicit/bad decision </strong>such as rug-pulling (If implemented correctly, the risk substantially is lower)<br> <br>So <strong>ONLY INVEST IF YOU TRUST ALL OF THE MULTI-SIG ADDRESS.</strong></li><li>There is a risk of <strong>unlimited minting</strong> <strong>of rPXL </strong>token by the token owner which is a normal wallet. This can be exploited for soft-rugging in the future. The owner is also <strong>unrelated</strong> and is not one of the DAO multi-sig’s signers.</li><li>There is a risk of <strong>favorable allocation</strong> of whitelist: The owner (which is a normal wallet) have full control the whitelisting. The owner can also use an existing unused contract with existing minter role to do this outside of known public contract.</li><li>There is a risk of <strong>fund stuck</strong> due to multi-sig inactivity since all funds are in the DAO multi-sig wallet.</li><li>Overall this is an unverified contract with a highly authorized normal wallet in contrast of containing a multi-sig wallet with the risk mention above.</li></ol><h3>Possible Rug Route</h3><p>Here we demonstrate a possible way to <strong>hard-rug</strong> with this contract</p><ol><li>Let people buy rPXL in exchange for FRAX with 0x2ecb3fec function because all funds go to the DAO Address.</li><li>If 4 wallets belong to 1 signer, the wallet is treated as owner normal wallet. The signers then transfers all FRAX to themself.<br>[Note: Need consent from 4/5 Multi-sig, if 3 wallets belong to 1 signer they only need to convince 1 signer]</li><li>Owner does not deploy PXL liquidity or OHM fork contract.</li></ol><p>Here we demonstrate a possible way to <strong>soft-rug</strong> with this contract</p><ol><li>Let people buy rPXL in exchange for FRAX with 0x2ecb3fec function because all funds go to the DAO Address.</li><li>Add rPXL-FRAX LP or deploy a claim PXL with rPXL</li><li>Owner, a normal wallet, use <strong>unlimited minting</strong> via rPXL token minting and gradually dump minted rPXL to the market.<br>[Note: No consent needed from 4/5 Multi-sig]</li></ol><p>Here we demonstrate a possible way to <strong>stuck-rug</strong> with this contract</p><ol><li>Let people buy rPXL in exchange of FRAX with 0x2ecb3fec function because all funds goes to the DAO Address.</li><li>Something happen and 2 of the signer address (from 5) in multi-sig refuse to approve for transaction.</li><li><strong>Fund stuck forever</strong> in the multi-sig wallet</li></ol><p>If this helpful to you, you can <strong>tip</strong> me here</p><h3>Tip Address</h3><p><strong>[</strong>ERC20/BSC/AVAX(C-chain)/Polygon/FTM]<br>0xC1f2154ea0B0E5779Ff84bb11A5ed209Fd0741DF</p><p><strong>Follow me in Twitter</strong>: <a href="https://twitter.com/indyza_">https://twitter.com/indyza_</a></p><p><strong>Join Olympians Discord for discussion and code review request in (#</strong>🛠│code-talk): <a href="https://discord.gg/ucQwJZEmwa">https://discord.gg/ucQwJZEmwa</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7486be811b7f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DominiumDAO Presale Contract Review]]></title>
            <link>https://medium.com/@indyza/dominiumdao-presale-contract-review-92942906af60?source=rss-6e432ea1711f------2</link>
            <guid isPermaLink="false">https://medium.com/p/92942906af60</guid>
            <category><![CDATA[dominiumdao]]></category>
            <category><![CDATA[dao]]></category>
            <category><![CDATA[contract-review]]></category>
            <category><![CDATA[crypto]]></category>
            <category><![CDATA[presales]]></category>
            <dc:creator><![CDATA[IndyZa]]></dc:creator>
            <pubDate>Fri, 14 Jan 2022 14:44:18 GMT</pubDate>
            <atom:updated>2022-01-14T22:42:59.223Z</atom:updated>
            <content:encoded><![CDATA[<p>Review Date: 14 Jan 2022 11:35 UTC<br>Update Date: 14 Jan 2022 22:11 UTC</p><p><em>Disclaimer: This is </em><strong><em>not an audit</em></strong><em> of any kind. Please do not call my code review an audit. These reviews are for entertainment &amp; education purpose only and are not financial advice.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Fssh3M7g8K05oj54.png" /><figcaption>Image by <a href="https://discord.gg/olympians">Olympians</a></figcaption></figure><h3>Basic Information</h3><p><strong>Presale Contract/NFT Address</strong>: <a href="https://polygonscan.com/address/0xa04a030f4c8b22b11e98e1cbaf280e0ff01fed79#code">https://polygonscan.com/address/0xa04a030f4c8b22b11e98e1cbaf280e0ff01fed79#code</a><br>*Update 1: change contract address</p><p><strong>Owner/Multi-sig Address</strong> (4/4 Gnosis Multi-sig Contract): <br><a href="https://polygonscan.com/address/0xfE3dfaf07D859c420d0d0D0D187ab66C9667B12E#code">https://polygonscan.com/address/0xfE3dfaf07D859c420d0d0D0D187ab66C9667B12E#code</a></p><blockquote>Note: The contract was provided by DominiumDAO team beforehand which will be announced in their social media.</blockquote><h3>Interesting Points</h3><p>1. Contract ownership is <strong>not</strong> renounced</p><p>2. There are <strong>constant values</strong> that can not be changed:<br>- Multi-sig address for adding liquidity(multisigAddress) = <a href="https://polygonscan.com/address/0xfE3dfaf07D859c420d0d0D0D187ab66C9667B12E#code">0xfE3dfaf07D859c420d0d0D0D187ab66C9667B12E</a><br>- USDC token (stableCoin) = <a href="https://polygonscan.com/address/0x2791bca1f2de4661ed88a30c99a7a9449aa84174">0x2791bca1f2de4661ed88a30c99a7a9449aa84174</a><br>- NFT Token Type index from 0 to 4 (5 total type) [The information in it can be changed]</p><blockquote>Note: Other value in the constructor<strong> can be adjusted by the owner</strong> later except the above constant</blockquote><p><strong>Other value</strong> that are preselected but <strong>can be changed later</strong> by owner are <br>- withdrawal address (withdrawerAddress) = 0x000….0000<br>- Delay until refund (maxPresaleTime) = Contract creation date + 30 day<br>- multi-sig percentage (multisigWithdrawalPoints)= 30% or 3000<br>- base uri (baseURI) = <a href="https://gateway.pinata.cloud/ipfs/QmWsWYq7yht2arRro8SZdzraqADzmQQGVsLsYdcY3uwRhG/">https://gateway.pinata.cloud/ipfs/QmWsWYq7yht2arRro8SZdzraqADzmQQGVsLsYdcY3uwRhG/</a><br>- Cost, name, reward, staking cost, availability and base extension of all 5 type of NFT are preset where<br>Index 0: Marcus Aurelius, cost 20000 USDC, available<br>Index 1: Alexander the Great, cost 500 USDC, available<br>Index 2: Aristotle, cost 10000 USDC, unavailable<br>Index 3: Plato, cost 1000 USDC, unavailable<br>Index 4: Socrates, cost 100 USDC, unavailable</p><blockquote>Note: All NFT type reward amount and staking cost is not set which suggest that it will be set by the owner later</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*70NbRGfv4V1oJ3Df2S-f9Q.png" /><figcaption>Contract Creation Parameter (Constructor) in Presale Contract</figcaption></figure><p>3. Presale logic is <strong>merge</strong> with NFT ERC721 token code this means that the NFT token have a presale logic in it permanently.</p><p>4. mint function can be use by the user to exchange USDC for minting the selected(index) NFT type.</p><p>The user can only buy if<br>- If presale timer(saleTimer) is enable, the user need to bought within the designated time frame set by the owner.<br>- The minting is not paused (paused) by the owner<br>- If the selected(index) NFT type is available for sale.<br>- If the whitelist is enable only whitelist user can buy (Doesn’t apply to owner)</p><p>When the user buy the selected(index) NFT type, the amount of USDC is transferred to the contract from the user at the cost of the selected NFT (cost). The contract then mint the NFT to the user with the type with NFT index equal to the current amount of supply + 1. The contract then record the amount that the user buy in total and the amount bought</p><blockquote>Note that the owner (multi-sig) can mint without any cost, this suggest 2 things: <br>a. the owner can do <strong>unlimited NFT mint</strong> for staking<br>b. the owner can assign this to another contract to allow mint via other logic/cost<br> <br>*All approval will need to go through Multi-sig during presale to launch process</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qKXf4tZttU3wVpkyUIRl4Q.png" /><figcaption>mint function in Presale Contract</figcaption></figure><p>5. whitelistUsers and unWhitelistUsers function can be used by the owner <strong>at anytime</strong>. This allow the owner to add(batch) and remove(batch) whitelist user.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*db7RQ0gthKlw9Jw9SbunXA.png" /><figcaption>whitelistUsers, unWhitelistUsers in function</figcaption></figure><p>6. startPresale and endPresale can only be used by the owner at anytime. This allow the owner to open/close presale.</p><p>When the owner <strong>start presale</strong> (startPresale), it’ll be open for the duration of 48 hour from designated open time (startTimestamp) and only NFT type 0 (Marcus Aurelius) and 1 (Alexander the Great) will be available for sale at the cost of 20000 and 500 USDC respectively. Time to refund duration will also be set to 30 day from the moment this function is called. <strong>Only whitelist user can purchase during this period</strong>.</p><p>When the owner <strong>end presale</strong> (endPresale ), the sale timer will be disabled and sale will be set to paused (paused).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*l5ZAo45yVHz1wS0hX6h1HA.png" /><figcaption>startPresale, endPresale function in Presale Contract</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ni126fKLCmVUKoSbITHLkA.png" /><figcaption>startSaleTimer and endSaleTimer function used in startPresale and endPresale function</figcaption></figure><p>7. startPublicSale and endPublicSale can only be used by the owner at anytime. This allow the owner to open/close public sale.</p><p>When the owner <strong>start public sale </strong>(startPublicSale), it’ll be open until the owner close it and only NFT type 2 (Aristotle), 3 (Plato) and 4 (Socrates) will be available for sale at the cost of 10000, 1000 and 100 USDC respectively. Whitelisted will turn off and <strong>any user can purchase during this period</strong>.</p><p>When the owner <strong>end public sale</strong> (endPublicSale ), the sale will be set to paused (paused).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/802/1*0yXsglxJma9wh9V7NgJJaQ.png" /><figcaption>startPublicSale, endPublicSale in Presale Contract</figcaption></figure><p>8. publicCancelLaunch function <strong>allow any user to cancel and refund</strong> the whole presale. User can use this function only when the time passed the refund period (maxPresaleTime) which is 30 day from using startPresale or a set amount of period from setMaxPresaleTime by the owner. This function will also drain all USDC from the multi-sig/owner address.</p><blockquote>The current multi-sig <strong>approve infinite spending on presale contract</strong> which allow USDC draining to be possible.<br><a href="https://polygonscan.com/tx/0xf15630c13f1bec0ba3eb03dbfaf9f8bb8ebe636870fc9cb5666f294ca6c2cad7">https://polygonscan.com/tx/0xf15630c13f1bec0ba3eb03dbfaf9f8bb8ebe636870fc9cb5666f294ca6c2cad7</a></blockquote><p>cancelLaunch function can only be used by the owner at <strong>anytime</strong>. Owner can cancel the sales and start the refund process immediately.</p><p>publicWithdraw allow any user to <strong>refund the bought amount</strong>, this can <strong>only be used when the sale is cancelled </strong>either by publicCancelLaunch or cancelLaunch function. When used, the contract will send the USDC equal to the amount user bought to the user.</p><blockquote><em>This means that if something happen and the funds stuck in the multi-sig or presale contract. Approximately, </em><strong><em>after 30 days from the presale start</em></strong><em> period the</em><strong><em> user can use </em></strong><em>publicCancelLaunch</em><strong><em> and then </em></strong><em>publicWithdraw</em><strong><em> to FULL REFUND</em></strong><em> the amount bought</em><strong><em>.</em></strong></blockquote><blockquote><strong><em>Note</em></strong><em>: Draining USDC from multi-sig will not work after adding DOM-USDC liquidity because USDC is in the liquidity.</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0zgXgQAg4016FdI5ZGXx8A.png" /><figcaption>publicWithdraw, publicCancelLaunch function in Presale Contract</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/714/1*xFY_ijYgcEt1UyPq6EpEfw.png" /><figcaption>cancelLaunch function in Presale Contract</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/723/1*H78wM6Av3me0jhKZRgnO2g.png" /><figcaption>Allowance for presale contract to drain USDC from multi-sig</figcaption></figure><p>9. multisigWithdraw function can only be called by the owner when the presale is <strong>not cancel</strong> and <strong>withdrawer address is set</strong>.</p><p>When call this function, 30% (liquidityFundsAmount) of total raised USDC will be transfer from the contract to the <strong>multi-sig address(owner)</strong>.</p><p>setWithdrawal function allow the owner to adjust the liquidity percentage for multisigWithdraw at anytime.</p><p>setWithdrawer function can only be used by the owner to set withdrawer address which will be use for the owner to send USDC from the contract to this address using privateWithdraw function.</p><p>privateWithdraw function can only be used by the owner to send USDC from the contract address to <strong>withdrawer address</strong> at <strong>any amount</strong>.</p><blockquote><em>Note:</em><strong><em> withdrawer address is NOT the multi-sig address (owner)</em></strong><em>.<br></em><strong><em>Multi-sig address’s</em></strong><em> funds are use for adding liquidity (30% of USDC).<br></em><strong><em>Withdrawer address’s</em></strong><em> funds are use for other objective such as sending to treasury and development wallet later on at the designated amount.<br>*All are for owner only uses.</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2c2pXTHwXHb7TCkzMzKApA.png" /><figcaption>multisigWithdraw, setWithdrawal, setWithdrawer and privateWithdraw function in Presale Contract</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/978/1*fjHKbnJNgIWyuvXfQB2d-Q.png" /><figcaption>liquidityFundsAmount function in Presale Contract</figcaption></figure><p>10. <strong>Owner address</strong> is a Gnosis Multi Sig wallet with <strong>4/4</strong> meaning 4 signer out of 4 signer address need to confirm the transaction.</p><p>These are the 4 Address<br>- <a href="https://polygonscan.com/address/0x293B854B0D3066efB1254B30269aF53790270Ea5">0x293B854B0D3066efB1254B30269aF53790270Ea5</a><br>- <a href="https://polygonscan.com/address/0x55Cb753937E091bc0cDC3D7D1c9201703AEee826">0x55Cb753937E091bc0cDC3D7D1c9201703AEee826</a><br>- <a href="https://polygonscan.com/address/0x7E039e283C2e5cF2683285E4Ba79dEBf94f32b99">0x7E039e283C2e5cF2683285E4Ba79dEBf94f32b99</a><br>- <a href="https://polygonscan.com/address/0xC1f2154ea0B0E5779Ff84bb11A5ed209Fd0741DF">0xC1f2154ea0B0E5779Ff84bb11A5ed209Fd0741DF</a></p><p>Since <strong>I’m in the multi-signature</strong> I can confirm that there are these party in the multi-signature<br>- 3 Address from Dominium Team (Socrates, Onrul, Et Auream)<br>- 1 Address from IndyZa (Me) — 3rd Party</p><p>11. setCost, setName, setRewardAmount, setStakeCost, setAvailable, setBaseExtension and setBaseURI function can be use by the owner at anytime to change any NFT type value such as cost, name, reward amount, staking cost, availability of NFT for sale, base extension. Base URI effects all NFT type.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fGM5MvdHiTbEuC-DTFXxsg.png" /><figcaption>setCost, setName, setRewardAmount, setStakeCost, setAvailable, setBaseExtension, setBaseURI function in Presale Contract</figcaption></figure><p>12. addNewNFTType function allow the owner to add more NFT type with the cost, name, reward amount, staking cost, available and base extension at <strong>anytime</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uWnRuLao5j06MRCC98xDBg.png" /><figcaption>addNewNFTType function in Presale Contract</figcaption></figure><h3>Closing Thought</h3><ol><li>This contract is a contract where the owner can withdraw all deposit USDC from the contract. The wallet address is a 4/4 multi signature wallet contract. <strong>The multi-sig </strong>can risk in multiple ways:<br>- risk in of 4 address <strong>conspiring for illicit/bad decision </strong>such as rug-pulling<br><br>So <strong>ONLY INVEST IF YOU TRUST THE TEAM AND 3RD PARTY ADDRESS.<br></strong>(3rd Party address is me.)</li><li>There is a risk of <strong>unlimited minting of NFT </strong>token by the owner (4/4 multi-sig) which can result in increase of supply and exploit in NFT staking. <br>(3rd party will need to consent for this action.)</li><li><strong>Full refund are control in a countdown timer function of 30 day after presale </strong>so there is no need for any multi-sig consent to refund, even if the fund is already sent to multi-sig it’ll be drain back to presale contract for refund with pre-spending approval set up.</li><li>There is a risk of <strong>inability to do a full refund</strong> due to unusable launched product that make NFT not yield DOM token after adding DOM-USDC liquidity.<br>(This risk apply to most NFT-earn-token project with a presale that only offer token after launch)</li><li>There is <strong>no DOM token deployed, </strong>which will be reward from NFT staking, at the time of writing this so the user will be risk of <strong>unlimited minting</strong> unless the ownership is assign to the 4/4 multi-sig.<br>(3rd party are able to check this before allow moving presale funds)</li><li>Overall this is a presale contract with a stuck rug prevention for full signer multi-sig with the risk mention above.</li></ol><h3>Possible Rug Route</h3><p>Here we demonstrate a possible way to <strong>hard-rug</strong> with this contract</p><ol><li>Let people mint NFT in exchange of USDC with mint function.</li><li>Owner use setWithdrawer to set private withdraw destination to team address.<br><strong>(The team will need to convince the 3rd Party)</strong></li><li>Owner use privateWithdrawal to withdraw all USDC to the team address.<br><strong>(The team will need to convince the 3rd Party)</strong></li><li>Owner never deploy/set up any liquidity or contract.</li></ol><p>Here we demonstrate a possible way to <strong>soft-rug</strong> with this contract</p><ol><li>Let people mint NFT in exchange of USDC with mint function.</li><li>Deploy OHM fork normally and open NFT staking</li><li>Owner with 4/4 policy use <strong>unlimited minting</strong> of NFT via token minting (mint).<br><strong>(The team will need to convince the 3rd Party)</strong></li></ol><blockquote>Note that convince the 3rd Party<strong> </strong>will not apply after launch if there is a handover of ownership of NFT Presale Contract back to the team</blockquote><p>Here we demonstrate a possible way to <strong>stuck-rug</strong> with this contract</p><p><em>- No possible way to create stuck rug without 3rd Party Confirmation</em></p><p>If this helpful to you, you can <strong>tip</strong> me here</p><h3>Tip Address</h3><p><strong>[</strong>ERC20/BSC/AVAX(C-chain)/Polygon/FTM]<br>0xC1f2154ea0B0E5779Ff84bb11A5ed209Fd0741DF</p><p><strong>Follow me in Twitter</strong>: <a href="https://twitter.com/indyza_">https://twitter.com/indyza_</a></p><p><strong>Join Olympians Discord for discussion and code review request in (#</strong>🛠│code-talk): <a href="https://discord.gg/ucQwJZEmwa">https://discord.gg/ucQwJZEmwa</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=92942906af60" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ZeroShift DAO Presale Contract Review]]></title>
            <link>https://medium.com/@indyza/zeroshift-dao-presale-contract-review-7bf94bfb6f65?source=rss-6e432ea1711f------2</link>
            <guid isPermaLink="false">https://medium.com/p/7bf94bfb6f65</guid>
            <category><![CDATA[dao]]></category>
            <category><![CDATA[zeroshift-dao]]></category>
            <category><![CDATA[contract-review]]></category>
            <category><![CDATA[presales]]></category>
            <category><![CDATA[crypto]]></category>
            <dc:creator><![CDATA[IndyZa]]></dc:creator>
            <pubDate>Tue, 11 Jan 2022 21:32:32 GMT</pubDate>
            <atom:updated>2022-01-11T21:32:32.424Z</atom:updated>
            <content:encoded><![CDATA[<p>Review Date: 11 Jan 2021 20:12 UTC</p><p><strong>Special Thanks </strong><br>Proofreading: Checkmate</p><p><em>Disclaimer: This is </em><strong><em>not an audit</em></strong><em> of any kind. Please do not call my code review an audit. These reviews are for entertainment &amp; education purpose only and are not financial advice.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*bv25ZhMij9Q45_fn.png" /><figcaption>Image by <a href="https://discord.gg/olympians">Olympians</a></figcaption></figure><h3>Basic Information</h3><p><strong>Contract Address</strong>: <a href="https://snowtrace.io/address/0x1a856f6ae07c9bd58303ba853f0752784566107f#code">https://snowtrace.io/address/0x1a856f6ae07c9bd58303ba853f0752784566107f#code</a></p><p><strong>Owner/DAO Address (Deprecate Gnosis Multi-Sig Contract)</strong>: <a href="https://snowtrace.io/address/0x197123d62a2252c0ac668a72baae39af333843e0#code">https://snowtrace.io/address/0x197123d62a2252c0ac668a72baae39af333843e0#code</a></p><p><strong>dZRST Token Address</strong>: <a href="https://snowtrace.io/address/0xbfd44c6feb91dbf3c84228be65e844968567fcc2#code">https://snowtrace.io/address/0xbfd44c6feb91dbf3c84228be65e844968567fcc2#code</a></p><p><strong>ZRST Token Address</strong>: <a href="https://snowtrace.io/address/0x7b2d03e8e569042b91750ab32c544894c726a712">https://snowtrace.io/address/0x7b2d03e8e569042b91750ab32c544894c726a712</a></p><blockquote>Note: The presale is not started yet. The contract was provided by ZeroShift DAO from the project’s discord announcement</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iQMukJOrBHAEGHAadBEIzQ.png" /><figcaption>ZeroShift <a href="https://discord.com/channels/899234620393009182/904208096610639903/924364273814229093">Announcement</a> in Discord</figcaption></figure><h3>Interesting Points</h3><p>*Owner = DAO Address and is multi-sig</p><p>1-. The presale contract ownership is <strong>not</strong> renounced.</p><p>2. There are <strong>constant values</strong> that can not be changed:<br>- dZSRT token(dZeroShift) = <a href="https://snowtrace.io/address/0xbfd44c6feb91dbf3c84228be65e844968567fcc2">0xbfd44c6feb91dbf3c84228be65e844968567fcc2</a><br>- ZRST token (zeroShift) = <a href="https://snowtrace.io/address/0x7b2d03e8e569042b91750ab32c544894c726a712">0x7b2d03e8e569042b91750ab32c544894c726a712</a><br>- USDC.e token (USD) = <a href="https://snowtrace.io/address/0xa7d7079b0fead91f3e65f86e8915cb59c1a4c664">0xa7d7079b0fead91f3e65f86e8915cb59c1a4c664</a><br>- DAI token (DAI) = <a href="https://snowtrace.io/address/0xd586e7f844cea2f87f50152665bcbc2c279d8d70">0xd586e7f844cea2f87f50152665bcbc2c279d8d70</a><br>- DAO Address (DAO) = <a href="https://snowtrace.io/address/0x197123d62a2252c0ac668a72baae39af333843e0">0x197123d62a2252c0ac668a72baae39af333843e0</a><br>- Price for Whitelist User (price) = 5x10⁶ or 5 USDC.e per dZSRT<br>- Price for Whitelist Team Member (priceDai) = 5x10¹⁸ or 5 DAI per dZSRT<br>- Max Cap for Whitelist User (cap) = 500x10⁶ or 500 USDC.e<br>- Max Cap for Whitelist Team Member (capDai) = 500x10¹⁸ or 500 DAI</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/657/1*piPf5UHAh5NrSaCEUF0VBQ.png" /><figcaption>Fixed value in Presale Contract</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/456/1*K60r9E3z3eFRQUbgG9mCMQ.png" /><figcaption>Contract Creation Parameter (Constructor) in Presale Contract</figcaption></figure><p>3. There are <strong>2 types of whitelist users</strong> in this presale throughout the contract: <strong>NORMAL</strong> and <strong>TEAM</strong> users.</p><p>4. addWhitelist, addMultipleWhitelist and removeWhitelist function can be used by the owner <strong>before the presale starts</strong>. This allow the owner to add(single/batch) and remove(single) normal whitelist user.</p><p>Note that only addWhitelist and addMultipleWhitelist function can be used if the owner paused the contract with togglePause function.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/555/1*19HNoPTrBPVhkfnUGp70EQ.png" /><figcaption>addWhitelist, addMultipleWhitelist, removeWhitelist function in Presale Contract</figcaption></figure><p>5. addTeam and removeTeam function can be used by the owner <strong>before the presale starts</strong>. This allow the owner to add(single/batch) and remove(single) team whitelist user along with how many whitelist number they get.</p><p>Note: addTeam function can also be used if the owner paused the contract with togglePause function.</p><blockquote>Team whitelist user can get <strong>multiple number of whitelist,</strong> which make the max purchase cap for team user larger than normal user.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/579/1*67vIlgPGUJ9Fm2-Gq3s0fQ.png" /><figcaption>addTeam, removeTeam function in Presale Contract</figcaption></figure><p>6. deposit function can be use by the <strong>normal user</strong> to exchange USDC.e for dZRST.</p><p>The user can only buy if<br>- Presale has started by the owner<br>- Presale has not ended by the owner<br>- user is a normal whitelist<br>- the amount bought doesn’t exceed the max cap</p><p>When the user deposit, the set amount of USDC.e is sent from the user to the owner(DAO). The contract then mints dZRST to the user at the rate of 5 USDC.e per dZRST. The contract then records the amount of USDC.e that the user purchased for and the amount of dZRST received.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FTICjbdALKPCLqpKky6sWA.png" /><figcaption>deposit function in Presale Contract</figcaption></figure><p>7. depositTeam function can be use by the <strong>team user</strong> to exchange DAI for dZRST. The rate is 5 DAI per dZRST.</p><p>All process is the same as normal user <strong>except</strong><br>- team user use DAI instead of USDC.e<br>- team user can have multiple whitelist spot, meaning they can buy more than the normal user depending on the multiplier</p><p><strong>For example,</strong> the team with 2 whitelist spot can buy 1000 DAI as a max cap (500x2).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9tqsghiupkYay6G7ixMYUw.png" /><figcaption>depositTeam function in Presale Contract</figcaption></figure><p>8. start and end function can only be used by the owner to start the presale at anytime and end the presale at <strong>anytime </strong>after it started.</p><p>Once started, no whitelist user of any type can be added, deposit will be open and owner can initiate end presale at <strong>anytime</strong> <strong>manually</strong>.</p><p>After ending is triggered by the owner, whitelist user can no longer deposit and owner can then trigger claiming using claimUnlock later.</p><blockquote>All process from starting, ending and open claiming is <strong>manual</strong> without indicated timeframe. Each process can not be reverted and must go in succession.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/802/1*DC0lURqcNFr6nCBx6kVuBQ.png" /><figcaption>start, end function in Presale Contract</figcaption></figure><p>9. claimUnlock function can only be called by the owner anytime but only once the end presale has been called.</p><p>This function allows the owner to open claim for the whitelist user to <strong>swap dZRST to ZRST</strong> using withdraw function.</p><p>When the user use withdraw function, the dZRST is <strong>burn</strong> from the user’s wallet and the contract sends ZRST to the user. The exchange rate for dZRST to ZRST is at a 1:1 rate.</p><blockquote>Note that<strong> if there is no ZRST exist in the presale contract, withdraw will not work</strong>. This means that the owner of the ZRST token contract will need to mint to the presale contract at the same dZRST amount before opening claim (claimUnlock function).</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/888/1*WFAY9xjN9gNsxvJ4VinkLg.png" /><figcaption>claimUnlock function in Presale Contract</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/988/1*xPHxnPf8HE7LRHjYm8x4gg.png" /><figcaption>withdraw function in Presale Contract</figcaption></figure><p>10. adminWithdraw function can only be use by the owner at anytime. This allows the owner to <strong>withdraw any token at full amount at anytime</strong> with no constraint.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xj5PIF0VGMh6n5CvjG0i-w.png" /><figcaption>adminWithdraw function in Presale Contract</figcaption></figure><p>11. togglePause function can only be use by the owner at anytime. This allows the owner to pause the contract which disables the following ability<br>- deposit for both normal and team whitelist<br>- withdraw (swap) of ZRST using dZRST</p><blockquote>This means that the owner can pause withdrawal(swapping for ZRST) at <strong>anytime </strong>while the owner can withdraw any token without this restriction.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/880/1*Cz6flcpt2q30x08uUSWgfg.png" /><figcaption>togglePause function in Presale Contract</figcaption></figure><p>12. <strong>Owner and DAO Address</strong> is the <a href="https://snowtrace.io/address/0x197123d62a2252c0ac668a72baae39af333843e0#code">same</a>. The address is a <a href="https://github.com/gnosis/MultiSigWallet">deprecated Gnosis Multi-Sig Contract</a>, deprecated version means that the contract is no longer officially support with the introduction of Safe Multi-sig since 2019.</p><p>The multi-sig policy is 4/6 meaning that meaning 3 signer out of 5 signer address need to confirm the transaction.</p><p><strong>6 Signer Address consist</strong> of<br><strong>Wallet #1</strong> :–<br><a href="https://snowtrace.io/address/0x6635515d11ab778bfb781e749a581a12270dd4cb">0x6635515d11ab778bfb781e749a581a12270dd4cb</a> (~17 days old, 13 txn)<br>Funded by <a href="https://snowtrace.io/tx/0xb29d1bbde6a5da97201d5566999f706490a2509fc211c578ce08dfce64b83b1c">Tornado Cash</a> Protocol</p><p><strong>Wallet #2</strong> :–<br><a href="https://snowtrace.io/address/0x941df11c97182263a2103cec49e383ad3967fbb8">0x941df11c97182263a2103cec49e383ad3967fbb8</a> (~30 days old, 7 txn)<br>Funded by <a href="https://snowtrace.io/address/0x3a26c271cd9be1bc96a1b636f124007af9b91069">0x3a26c271cd9be1bc96a1b636f124007af9b91069</a> which funded by Binance Hot Wallet</p><p><strong>Wallet #3</strong> :–<br><a href="https://snowtrace.io/address/0x722970e5c9099e3b93cb1e09ccb62b56ebfa344b">0x722970e5c9099e3b93cb1e09ccb62b56ebfa344b</a> (~27 days old, 6 txn) <br>Funded by <a href="https://snowtrace.io/address/0x7ed53f6e3de6b2b4156fa8e618506e60d8e65843">0x7ed53f6e3de6b2b4156fa8e618506e60d8e65843</a></p><p><strong>Wallet #4 </strong>:–<br><a href="https://snowtrace.io/address/0x95290be82fcd524eb759c1b0b1ee2e369bbc1460">0x95290be82fcd524eb759c1b0b1ee2e369bbc1460</a> (~32 days old, 1 txn)<br>Funded by <a href="https://snowtrace.io/address/0x32855ec5680956f3b6db54d24babf29bb6b360fb">0x32855ec5680956f3b6db54d24babf29bb6b360fb</a> which somehow doesn’t have AVAX funds origin in snowtrace</p><p><strong>Wallet #5 </strong>:–<br><a href="https://snowtrace.io/address/0x201f6bd429a7b97fe27c3221d3a1b336eb363568">0x201f6bd429a7b97fe27c3221d3a1b336eb363568</a> (~17 days old, 1 txn) Funded by <a href="https://snowtrace.io/tx/0xf624488df80e81a418bc27d45a880678f60a57e07c1f19066808e16ad1285ec0">Tornado Cash</a> Protocol</p><p><strong>Wallet #6 </strong>:–<br><a href="https://snowtrace.io/address/0xead16e57a35a16f3b4ed3a34033ccff1f8c39a65">0xead16e57a35a16f3b4ed3a34033ccff1f8c39a65</a> (~17 days old, 1 txn)<br>Funded by <a href="https://snowtrace.io/tx/0xf624488df80e81a418bc27d45a880678f60a57e07c1f19066808e16ad1285ec0">Tornado Cash</a> Protocol</p><blockquote>In short, total of 3 wallets: Wallet #1, Wallet #5, and Wallet #6 is <strong>transactionally anonymous and funded by Tornado Cash. </strong>I would highly suggest user to always confirm if the wallet is the designated party, to <strong>avoid 4 wallet control by 1 person scenario which is just enough for this 4/6 multi-sig policy.</strong></blockquote><blockquote>User should always check, confirm and identify with the project on who is holding the multi-sig to avoid ruggable scenario.</blockquote><p>13. dZRST is a <strong>customized token contract</strong> but is implemented <strong>similarly to vault-based minting</strong> ERC20 token. This means the the owner can assign who mints the coin which can means 2 things: <br>1) Allow the <strong>presale to mint and work properly</strong> in the presale contract when user deposit<br>2) Allow the owner to assign anyone to mint the token using setPresale which include <strong>allowing the owner themselves to unlimited minting</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lJ4EVM3CeJhd1xPbu5RQ5g.png" /><figcaption>mint function in dZRST token Contract</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ircP4G-Ithn3d4OPk78GcA.png" /><figcaption>setPresale function in dZRST token Contract</figcaption></figure><p>14. ZRST is a vault minting token contract where the owner can <strong>unlimited minting</strong> ZRST token. No treasury is set at the time of writing this, this suggests that the complete dApp is not setup for public or it doesn’t exist yet.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/519/1*e_BlDwvOqRagDYMchN6L6A.png" /><figcaption>mint function in ZRST token Contract</figcaption></figure><h3>Closing Thought</h3><ol><li>This contract allows the owner address to withdraw all deposit USDC.e and DAI from the contract using adminWithdraw function. The wallet address is a 4/6 multi signature wallet contract. <br><strong>The multi-sig </strong>can risk in multiple ways:<br>- risk in <strong>stale situation where the funds stuck</strong> because 3 address does not approve for the transaction <br>(If implemented correctly, the risk substantially is lower)<br>- risk of <strong>4 address belong to 1 person</strong> which make multi-sig a normal wallet (3 address are funded by Tornado Cash which may belong to one of the 3 other address)<br>- risk in of 4 address <strong>conspiring for illicit/bad decision </strong>such as rug-pulling (If implemented correctly, the risk substantially is lower)<br> <br>So <strong>ONLY INVEST IF YOU TRUST ALL OF THE MULTI-SIG ADDRESS.</strong></li><li>There is a risk of <strong>unlimited minting</strong> <strong>of ZSRT and dZSRT </strong>token by the token owner which is a multi-sig, this may cause soft-rug in the future.<br>[<strong>Suggest</strong> user to check who the multi-sig signer is]</li><li>There is a risk of <strong>owner never opening claim or pauses </strong>the contract, making it impossible for the user to retrieve ZRST since all the process need to be done manually.<br>[<strong>Suggest</strong> user to check the process and who the signer is]</li><li>There is a risk of over allocation of whitelist since team have the ability to get larger allocation with whitelist multiplier. <br>[<strong>Suggest</strong> user to check the allocation amount executed in the contract or multi-sig.]</li><li>There is a risk of <strong>fund stuck</strong> due to multi-sig inactivity since there is no cancel or refund functionality in the contract.</li><li>Overall this is a manual contract which depends highly on the multi-sig decision with the risk mention above.</li></ol><h3>Possible Rug Route</h3><p>Here we demonstrate a possible way to <strong>hard-rug</strong> with this contract</p><ol><li>Let people buy dZRST in exchange of USDC.e and DAI with deposit function because all funds goes to contract.</li><li>If 4 wallet belong to the owner, the wallet is treated as owner normal wallet. Owner then use adminWithdrawal to get all USDC.e and DAI (or transfer ownership to normal wallet then withdraw)<br>[Note: Need consent from 4/6 Multi-sig]</li><li>Owner don’t deploy ZRST liquidity or OHM fork contract.</li></ol><p>Here we demonstrate a possible way to <strong>soft-rug</strong> with this contract</p><ol><li>Let people buy dZRST in exchange of USDC.e and DAI with deposit function because all funds goes to contract.</li><li>Deploy OHM fork normally as well as ZRST-DAI LP or ZRST-USDC.e LP</li><li>Owner use <strong>unlimited minting</strong> via ZRST token minting and gradually dump minted ZRST to the market.<br>[Note: Need consent from 4/6 Multi-sig]</li></ol><p>Here we demonstrate a possible way to <strong>stuck-rug</strong> with this contract</p><ol><li>Let people buy dZRST in exchange of USDC with deposit function because all funds goes to contract.</li><li>Something happen and 3 of the signer address in multi-sig refuse to approve for transaction. <br>[Hard to happen for 4/6 multi-sig when set up properly]</li><li><strong>Fund stuck forever</strong> in the multi-sig wallet or the presale contract.</li></ol><p>If this helpful to you, you can <strong>tip</strong> me here</p><h3>Tip Address</h3><p><strong>[</strong>ERC20/BSC/AVAX(C-chain)/Polygon/FTM]<br>0xC1f2154ea0B0E5779Ff84bb11A5ed209Fd0741DF</p><p><strong>Follow me in Twitter</strong>: <a href="https://twitter.com/indyza_">https://twitter.com/indyza_</a></p><p><strong>Join Olympians Discord for discussion and code review request in (#</strong>🛠│code-talk): <a href="https://discord.gg/ucQwJZEmwa">https://discord.gg/ucQwJZEmwa</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7bf94bfb6f65" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[BoundlessDAO Seed-Round Presale Contract Mini-Review]]></title>
            <link>https://medium.com/@indyza/boundlessdao-seed-round-presale-contract-mini-review-7708dbe9dda7?source=rss-6e432ea1711f------2</link>
            <guid isPermaLink="false">https://medium.com/p/7708dbe9dda7</guid>
            <category><![CDATA[boundlessdao]]></category>
            <category><![CDATA[presale-contract]]></category>
            <category><![CDATA[mini-contract-review]]></category>
            <category><![CDATA[crypto]]></category>
            <category><![CDATA[dao]]></category>
            <dc:creator><![CDATA[IndyZa]]></dc:creator>
            <pubDate>Wed, 05 Jan 2022 20:47:05 GMT</pubDate>
            <atom:updated>2022-01-05T20:54:32.833Z</atom:updated>
            <content:encoded><![CDATA[<p>Review Date: 5 Jan 2021 20:30 UTC</p><p><em>Disclaimer: This is </em><strong><em>not an audit</em></strong><em> of any kind. Please do not call my code review an audit. These reviews are for entertainment &amp; education purpose only and are not financial advice.</em></p><blockquote><strong>Mini-review</strong> is a contract review in bite size version that mainly<strong> focus on risk</strong>. This allow me to review more contract with concise <strong>risk</strong>.</blockquote><h3>Basic Information</h3><p><strong>Presale Address</strong>: <a href="https://bscscan.com/address/0x672a39A95dB4aa635c950ab595D1CE42b9d677C2#code">https://bscscan.com/address/0x672a39A95dB4aa635c950ab595D1CE42b9d677C2#code</a></p><p><strong>Dev Address (Gnosis Multi-sig Wallet 3/4)</strong>: <a href="https://bscscan.com/address/0x46c5a2b0cb26873f72ff249d5323011eb84a048e#code">https://bscscan.com/address/0x46c5a2b0cb26873f72ff249d5323011eb84a048e#code</a></p><p><strong>Token Contract Address</strong>: No Token Address</p><h3>Risk</h3><ol><li><strong>Risk of 1 people own 3 signer in multi-sig wallet with 3/4 policy</strong><br>2 Wallet is &lt;1 days old funded by <a href="https://bscscan.com/address/0xd5ae1639e5ef6ecf241389894a289a7c0c398241">the same address</a> (fund by binance hot wallet), 1 is an empty wallet and 1 is a wallet &lt;2 days old.<br>So there is a possibility that the 2 wallet and an empty wallet is owned by the same person. (User should check with the team for confirmation)</li><li><strong>Risk of funds stuck forever </strong>[Stuck-rug Possibility]<strong><br></strong>If 2 of the address from the Multi-sig does not agree to withdraw the funds the fund is stuck forever in presale contract.</li><li><strong>Withdrawal Risk </strong>[Hard-rug Possibility]<strong><br></strong>Has <strong>withdraw</strong> all function for owner to take all BUSD out (consent from 3/4 multi-sig) using withdrawRaisedFunds function</li><li><strong>No claim token or claim functionality </strong>[Hard-rug Possibility]<br>There is no function or claim token address variable for the user to be able to claim any claimable token. <br><strong>User will not be able to be any token from this contract.</strong><br>(Although there is a cancel function for the owner to call and refund the user.)</li><li><strong>Contain unused code</strong><br>Most function is similar to DOVE finance presale contract but a lot of function is unused and cut out such as finalize function, saleFinishedTime and finalized variable. <br>This suggest that it might be <strong>poorly fork and copied</strong>.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pAWJTxQPYGwrTRL3qxf6kQ.png" /><figcaption>cancel, withdraw function</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*idyfDADjNoQX7tT_G3JvKg.png" /><figcaption>withdrawRaisedFunds function</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/662/1*8-QUhjeLTq4aCDvLTOqGoA.png" /><figcaption>finalize function (unused)</figcaption></figure><p><strong>Multi-sig Signer Addresses</strong><br>- <a href="https://bscscan.com/address/0x3487eA2Ab74cf3E3e4B5667E8519E705248200dF">0x3487eA2Ab74cf3E3e4B5667E8519E705248200dF</a> (&lt;2 days old)<br>- <a href="https://bscscan.com/address/0x2BE2D9A2eeC0941Dc25155a606A489EFA3207D73">0x2BE2D9A2eeC0941Dc25155a606A489EFA3207D73</a> (Empty Wallet)<br>- <a href="https://bscscan.com/address/0xb4EeAb518A61b7B09AA54c024De4c4447DC7cEE6">0xb4EeAb518A61b7B09AA54c024De4c4447DC7cEE6</a> (&lt;1 day old)<br>- <a href="https://bscscan.com/address/0xb4EeAb518A61b7B09AA54c024De4c4447DC7cEE6">0xb4EeAb518A61b7B09AA54c024De4c4447DC7cEE6</a> (&lt;1 day old)</p><p>If this helpful to you, you can <strong>tip</strong> me here</p><h3>Tip Address</h3><p><strong>[</strong>ERC20/BSC/AVAX(C-chain)/Polygon/FTM]<br>0xC1f2154ea0B0E5779Ff84bb11A5ed209Fd0741DF</p><p><strong>Follow me in Twitter</strong>: <a href="https://twitter.com/indyza_">https://twitter.com/indyza_</a></p><p><strong>Join Olympians Discord for discussion and code review request in (#</strong>🛠│code-talk): <a href="https://discord.gg/ucQwJZEmwa">https://discord.gg/ucQwJZEmwa</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7708dbe9dda7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[IndexDAO Presale Contract Mini-review]]></title>
            <link>https://medium.com/@indyza/indexdao-presale-contract-mini-review-e0a6d43c90c9?source=rss-6e432ea1711f------2</link>
            <guid isPermaLink="false">https://medium.com/p/e0a6d43c90c9</guid>
            <category><![CDATA[indexdao]]></category>
            <category><![CDATA[crypto]]></category>
            <category><![CDATA[mini-contract-review]]></category>
            <category><![CDATA[dao]]></category>
            <category><![CDATA[presales]]></category>
            <dc:creator><![CDATA[IndyZa]]></dc:creator>
            <pubDate>Mon, 03 Jan 2022 15:23:47 GMT</pubDate>
            <atom:updated>2022-01-03T20:10:01.095Z</atom:updated>
            <content:encoded><![CDATA[<p>Review Date: 3 Jan 2021 14:42 UTC<br>Update at: 3 Jan 2021 19:26 UTC</p><p><em>Disclaimer: This is </em><strong><em>not an audit</em></strong><em> of any kind. Please do not call my code review an audit. These reviews are for entertainment &amp; education purpose only and are not financial advice.</em></p><blockquote><strong><em>Mini-review</em></strong><em> is a contract review in bite size version that mainly</em><strong><em> focus on risk</em></strong><em>. This allow me to review more contract with concise </em><strong><em>risk</em></strong><em>.</em></blockquote><h3>Basic Information</h3><p><strong>Presale Address</strong>: <a href="https://snowtrace.io/address/0xade836a941fe3c76f7b8fcfb3ec15f2d9ef75df0#code">https://snowtrace.io/address/0xade836a941fe3c76f7b8fcfb3ec15f2d9ef75df0#code</a></p><p><strong>Dev Address (Normal Wallet)</strong>: <a href="https://snowtrace.io/address/0x9e380368495f5af9360fdb07d6c53d63677e2d9d">https://snowtrace.io/address/0x9e380368495f5af9360fdb07d6c53d63677e2d9d</a></p><p><strong>Owner Address (Multi-sig Address 3/3 Policy)</strong>: <a href="https://snowtrace.io/address/0xe5fe14e80cdb565d2e70a10c2423c48e1f415169#code">https://snowtrace.io/address/0xe5fe14e80cdb565d2e70a10c2423c48e1f415169#code</a></p><p><strong>Token Contract Address</strong>: No Token Address Set</p><h3>Risk</h3><ol><li><strong>Risk of 3 people own all multi-sig wallet</strong><br>1 Wallet is 140 days old while 2 other is &lt;12 days old and is funded from <a href="https://snowtrace.io/address/0x9e380368495f5af9360fdb07d6c53d63677e2d9d">the same address</a> that fund from Binance hot wallet.</li><li><strong>Risk of funds stuck forever </strong>[Stuck-rug Possibility]<strong><br></strong>If one of the address from the Multi-sig does not agree to withdraw the funds the fund is stuck forever in presale contract.</li><li><strong>Withdrawal Risk </strong>[Hard-rug Possibility]<strong><br></strong>Has <strong>withdraw</strong> all function for owner to take all MIM out (consent from 3/3 multi-sig) using withdraw function</li><li><strong>Exploit Withdrawal Risk </strong>[Hard-rug Possibility]<br><strong>Dev (normal wallet)</strong> can exploit to drain all MIM from presale contract using claim function (claimINDEX) <strong>without Multi-sig permission</strong>.<br>Dev can <strong>exploit</strong> by <br>- set price to 0 (setPrivateSalePrice)<br>- increase max amount sell (setMaxSold)<br>- add whitelist to multiple exploit wallet (approveBuyer) [Optional because this can also be done for public sale]<br>- use 0 MIM to buy max claim token at 200 (buyINDEX) <br>[Total amount deduct from user is determine by MIM amount * price<br><strong>For example, </strong>dev can just put 200 MIM and no MIM deduct, the amount invested of that user will be 200 MIM(claim token) do this with 500 address via script and dev can get 100,000 MIM(claim token) with 0 MIM]<br>- change claim token (INDEX token) to MIM (setIndexAddress) to also close the buy (no one can exploit after them)<br>- set claim to active (setClaimingActive)<br>- claim all MIM in all exploit wallet via script (claimINDEX)<br>(Dev can also use external wallet to <strong>make it looks like an unforeseen exploit</strong> since the person who did the exploit doesn’t need to be the dev, dev just need to set up price, whitelist, max sold and claim token address)<br> <br><em>Edit 1: edit exploit steps from 1 address to multiple address with 0 MIM the result is still the same.</em></li><li><strong>Unlimited Token Mint Risk</strong> [Hard-rug/soft-rug Possibility]<br>Presale Token contract is <strong>not set/exist </strong>and risk of unlimited mint by dev.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/620/1*-9801KzayFyb0UOBDnCylg.png" /><figcaption>claimINDEX, setIndexAddress, setClaimingActive, setPublicSaleActive, setMaxSold, setPrivateSalePrice, setPublicSalePrice function</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/514/1*ZAqy282oImKz_lqjuOhG2A.png" /><figcaption>buyINDEX function</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/636/1*BAkw-g-o29A5yyMoA5t35w.png" /><figcaption>withdraw function</figcaption></figure><p><strong>Multi-sig Signer Addresses</strong><br>- <a href="https://snowtrace.io/address/0x6c112f1cb540C850c7BDDD1ff581501661022Ac2">0x6c112f1cb540C850c7BDDD1ff581501661022Ac2</a><br>- <a href="https://snowtrace.io/address/0x951b928F2a8ba7CE14Cc418cfEBfeE30A57294c3">0x951b928F2a8ba7CE14Cc418cfEBfeE30A57294c3</a><br>- <a href="https://snowtrace.io/address/0xEE01D1f93307733D1aeAe29F219cd1Fd7C655880">0xEE01D1f93307733D1aeAe29F219cd1Fd7C655880</a></p><p>If this helpful to you, you can <strong>tip</strong> me here</p><h3>Tip Address</h3><p><strong>[</strong>ERC20/BSC/AVAX(C-chain)/Polygon/FTM]<br>0xC1f2154ea0B0E5779Ff84bb11A5ed209Fd0741DF</p><p><strong>Follow me in Twitter</strong>: <a href="https://twitter.com/indyza_">https://twitter.com/indyza_</a></p><p><strong>Join Olympians Discord for discussion and code review request in (#</strong>🛠│code-talk): <a href="https://discord.gg/ucQwJZEmwa">https://discord.gg/ucQwJZEmwa</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e0a6d43c90c9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Sierra Presale Contract Review]]></title>
            <link>https://medium.com/@indyza/sierra-presale-contract-review-46a6e89f89ff?source=rss-6e432ea1711f------2</link>
            <guid isPermaLink="false">https://medium.com/p/46a6e89f89ff</guid>
            <category><![CDATA[contract-review]]></category>
            <category><![CDATA[dao]]></category>
            <category><![CDATA[crypto]]></category>
            <category><![CDATA[sierra]]></category>
            <category><![CDATA[presales]]></category>
            <dc:creator><![CDATA[IndyZa]]></dc:creator>
            <pubDate>Sun, 02 Jan 2022 16:26:46 GMT</pubDate>
            <atom:updated>2022-01-09T18:41:07.527Z</atom:updated>
            <content:encoded><![CDATA[<p>Review Date: 2 Jan 2021 15:00 UTC</p><p><em>Disclaimer: This is </em><strong><em>not an audit</em></strong><em> of any kind. Please do not call my code review an audit. These reviews are for entertainment &amp; education purpose only and are not financial advice.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*kKuZuLgWCW6hOc5U.png" /><figcaption>Image by <a href="https://discord.gg/olympians">Olympians</a></figcaption></figure><h3>Basic Information</h3><p><strong>Contract Address</strong>: <a href="https://snowtrace.io/address/0x9d7ea54c0394de3c0dd28345f97e475a4778d0a9#code">https://snowtrace.io/address/0x9d7ea54c0394de3c0dd28345f97e475a4778d0a9#code</a></p><p><strong>Wallet Address</strong> (Gnosis Multi-sig Contract): <a href="https://snowtrace.io/address/0xc4d3dea0be3524b1bc5814fe6fd0f3a3ec028062#code">https://snowtrace.io/address/0xc4d3dea0be3524b1bc5814fe6fd0f3a3ec028062#code</a></p><p><strong>Owner Address</strong>: <a href="https://snowtrace.io/address/0xa06aba69adb309fa1a8fa786fb63377b3207a8c0">https://snowtrace.io/address/0xa06aba69adb309fa1a8fa786fb63377b3207a8c0</a></p><p><strong>SRA Token Address</strong>: <a href="https://snowtrace.io/address/0x01e6f4e1120f612f13a7a3fc6d3f6728f817e69d#code">https://snowtrace.io/address/0x01e6f4e1120f612f13a7a3fc6d3f6728f817e69d#code</a></p><h3>Interesting Points</h3><p>1. The presale contract ownership is <strong>not</strong> renounced.</p><p>2. There is a constant value that can not be changed which consist of <br>- Wallet (wallet) = <a href="https://snowtrace.io/address/0xc4d3dea0be3524b1bc5814fe6fd0f3a3ec028062">0xc4d3dea0be3524b1bc5814fe6fd0f3a3ec028062</a> <br>- SRA token (pToken) = <a href="https://snowtrace.io/address/0x01e6f4e1120f612f13a7a3fc6d3f6728f817e69d#code">0x01e6f4e1120f612f13a7a3fc6d3f6728f817e69d</a><br>- Closing Time (closingTime) = 1641499200 (January 6, 2022 20:00)<br>- Minimum Mim per user (MIN_MIM_LIMIT) = 1 MIM <br>- Maximum MIM per user Tier 1 (MAX_MIM_LIMIT_TIER_1) = 2000 MIM<br>- Maximum MIM per user Tier 2 (MAX_MIM_LIMIT_TIER_2) = 1400 MIM<br>- Maximum MIM per user Tier 3 (MAX_MIM_LIMIT_TIER_3)= 1000 MIM<br>- Maximum MIM per user Public Sale (MAX_MIM_LIMIT_PUBLIC)= 1200 MIM<br>- Price for Tier 1 Whitelist (PRICE_SRA_TIER_1) = 10 MIM per SRA<br>- Price for Tier 2 Whitelist (PRICE_SRA_TIER_2) = 7 MIM per SRA<br>- Price for Tier 3 Whitelist (PRICE_SRA_TIER_3)= 5 MIM per SRA<br>- Price for Public Whitelist (PRICE_SRA_PUBLIC)= 12 MIM per SRA</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/672/1*xqfzjkJ2Sfdt7bBalwV1ag.png" /><figcaption>Constant Value in Presale Contract</figcaption></figure><p>3. setClosingTime function can only be called by the wallet address at any time. The wallet address can change closing time of the the sale which also effect when you can claim.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/421/1*T28_vZUAJCbcKWvgwyIPvw.png" /><figcaption>setClosingTime function in Presale Contract</figcaption></figure><p>4. The owner can <strong>open and close presale and public sale at anytime</strong> with togglePresale and togglePublicSale function. This effect both buy and claim where you can only buy when presale/public sale open and claim when both presale and public sale close.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/397/1*wZj0OqWniKldwGtPfqwMRQ.png" /><figcaption>togglePresale function in Presale Contract</figcaption></figure><p>5. setWhiteListTiers can only be use for owner to change tierType for user at <strong>any time</strong>. The tier that can be change range from Public, Tier 1, Tier 2, and Tier 3.</p><blockquote>The owner can change the user tier at any time, this only effect <strong>before</strong> the user deposit the funds. If this is changed after, user deposit the funds user will not be effected.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/687/1*AsWYY1v1zIrfzeqTfygrEw.png" /><figcaption>setWhiteListTiers function in Presale Contract</figcaption></figure><p>6. deposit function can be use by the user to deposit MIM for an allocation of SRA that can be claim later.</p><p>The user can only buy if<br>- presale is open by the owner and user is whitelisted or public sale is open by the owner and user is not whitelisted<br>- buy amount is the set minimum amount of MIM (1 MIM)<br>- not exceed max MIM allocation (maxMimLimit)<br>- the total buy amount of SRA doesn’t exceed the contract’s total SRA (115k SRA)</p><p>When the user deposit, the set amount of MIM is send from the user to the contract. The contract then record the amount of MIM that the user purchase for. Each of the user in each tier will have a different rate on maximum buy and price as follow<br>Tier 1 — price at 10 MIM per SRA, total max buy amount at 2,000 MIM<br>Tier 2 — price at 7 MIM per SRA, total max buy amount at 1,400 MIM<br>Tier 3 — price at 5 MIM per SRA, total max buy amount at 1,000 MIM<br>Public — price at 12 MIM per SRA, total max buy amount at 1,200 MIM</p><blockquote>Note: You can not buy public sale if you are in whitelist (any tier) even if you didn’t buy on the presale period.</blockquote><blockquote><strong>All user can only buy at total of 115,000 SRA</strong> this means that if the total <strong>amount of whitelist user exceed 575 users</strong>. This means that the user will buy in a <strong>FCFS (First come first serve)</strong> manner until all SRA is bought.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/859/1*vfvL5uZz0M2SLJAkYTYOtw.png" /><figcaption>deposit function in Presale Contract</figcaption></figure><p>7. claim function is a function that allow user to claim the allocated SRA that the user buy. The user can <strong>only</strong> claim when the owner close both the presale and public sale but can do <strong>anytime</strong> when its available.</p><p>When the user claim they will receive the amount of SRA equal to the total amount they deposit at the SRA price rate the user bought for. The contract then send the SRA token from the contract to the user at the current vesting time (linear vesting) from the total vesting period(vestedTime) of 4 days. The vesting can be claim 25% of total SRA amount every 24 hours.</p><blockquote>User can claim at <strong>any time</strong> they will get the amount they are vesting at 25% per day for the total duration of 4 days.</blockquote><blockquote>Day 0-1 = 25%, Day 1-2 = 50%, Day 2-3 = 75%, Day 3+= 100%</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/716/1*7IWu_c5KUwGKdDBLeDbFQQ.png" /><figcaption>claim, getPriceAndDepositLimitsForAccount, getClaimableAmount function in Presale Contract</figcaption></figure><p>8. retrieveMim function can only be use by <strong>the wallet address</strong> (a 3/5 Multi-sig) at <strong>any time</strong>. The wallet address can <strong>withdraw all MIM</strong> from this contract to the wallet address.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/513/1*Heka6WfdakrOIbI7A66Q9w.png" /><figcaption>retrieveMim function in Presale Contract</figcaption></figure><p>9. retrieveExcessSRAToken function can only be use by the <strong>wallet address</strong> (a 3/5 Multi-sig) at <strong>any time</strong>. The wallet address can <strong>withdraw all SRA</strong> from this contract to the wallet address.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/843/1*DlQl79jTn4aMSeyXknw_FA.png" /><figcaption>retrieveExcessSRAToken function in Presale Contract</figcaption></figure><p>10. cancel function can only be used by the wallet address (a 3/5 Multi-sig) at anytime. This will cancel the presale. <strong>After cancel the user can withdraw full amount of deposit funds </strong>from the address using withdraw function, unless retrieveMim has already been used by the wallet address.</p><blockquote>This function act as a <strong>fail-safe</strong> for wallet address (multi-sig wallet) so all 3rd party can <strong>perform full refund to the user</strong>.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/466/1*JHU31KOmOGStN_O2SxyZ5w.png" /><figcaption>cancel, withdraw function in Presale Contract</figcaption></figure><p>11. <strong>Wallet address</strong> is a Gnosis Multi Sig wallet with <strong>3/5</strong> meaning 3 signer out of 5 signer address need to confirm the transaction.</p><p>These are the 5 Address<br>- <a href="https://snowtrace.io/address/0x39cbD7551Ff4abc59653E80C8Beb665F39a99a53">0x39cbD7551Ff4abc59653E80C8Beb665F39a99a53</a><br>- <a href="https://snowtrace.io/address/0x93D6E9BB863Ce296caa41b12D41537E34285372d">0x93D6E9BB863Ce296caa41b12D41537E34285372d</a><br>- <a href="https://snowtrace.io/address/0xB8FCaE2847530ff12955F7d9AADE6248ad78F45d">0xB8FCaE2847530ff12955F7d9AADE6248ad78F45d</a> <br>- <a href="https://snowtrace.io/address/0xC1f2154ea0B0E5779Ff84bb11A5ed209Fd0741DF">0xC1f2154ea0B0E5779Ff84bb11A5ed209Fd0741DF</a><br>- <a href="https://snowtrace.io/address/0xb59f4bB180E0927297D2315c12Cc378de8115A52">0xb59f4bB180E0927297D2315c12Cc378de8115A52</a></p><p>Since <strong>I’m in the multi-signature</strong> I can confirm that there are these party in the multi-signature<br>- 2 Address from Founder from Sierra (Sir Summit, SierraWGHT)<br>- 1 Address from IndyZa (Me) — 3rd Party<br>- 1 Address from <a href="https://twitter.com/3L3C70">Electo</a> (Abachi’s Founder)— 3rd Party<br>- 1 Address from <a href="https://twitter.com/BuyHighCellLow">BuyHighCellLow</a> — 3rd Party</p><blockquote>This means that at least <strong>one of the 3rd party address </strong>need to accept to do any transaction from the team. On the other hand all 3rd party can do <strong>emergency action</strong> <strong>without the team consent</strong>, this create a scenario where if something happen the multi-sig can be operate fully by 3rd party. Unless one of the 3rd party are not available.<br> <br><strong>Example in-case unexpected event happen</strong>:<br>3 of the 3rd party signer approve cancellation with cancel function to the Multi-signature wallet. All user can withdraw the funds they deposited.</blockquote><p>12. SRA Token is can be<strong> unlimited mint</strong> by the wallet address (3/5 multi-sig) using mint function. Though it need consent for the multi-sig mention in 11.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/547/1*uBqPdVcC4D-ySSl57akHTA.png" /><figcaption>mint function in SRA Token Contract</figcaption></figure><p>13. Wallet Address (Multi-sig) contain 35,000 SRA assuming for LP uses.</p><h3>Closing Thought</h3><ol><li>This contract is a contract where the wallet address can withdraw all deposit MIM from the contract. The wallet address is a 3/5 multi signature wallet contract. <strong>The multi-sig </strong>can risk in multiple ways:<br>- risk in <strong>stale situation where the funds stuck,</strong> in-case scenario where 2 of the team and 1 of the 3rd party address can’t attend<br>- risk in of 3 address <strong>conspiring for illicit/bad decision </strong>such as rug-pulling <br>(This include scenario like 2 team + 1 of 3rd party or all 3 of 3rd party)<br> <br>So <strong>ONLY INVEST IF YOU TRUST 3 OF THE 3RD PARTY ADDRESS.<br></strong>(3rd Party consist of Me<strong>, </strong><a href="https://twitter.com/3L3C70">Electo</a> (Abachi’s Founder), <a href="https://twitter.com/BuyHighCellLow">BuyHighCellLow</a>)</li><li>There is a risk of <strong>unlimited minting of SRA </strong>token by the wallet address (3/5 multi-sig) which can result in increase of supply but one 3rd party will need to consent for it.</li><li><strong>3rd Party can</strong> fully gain control of the funds in presale or wallet address and <strong>make a full refund for the user without team consent.</strong></li><li>Overall this is a presale contract with fail-safe and a good implementation of multi-sig 3/5 policy with the risk mention above.</li></ol><h3>Possible Rug Route</h3><p>Here we demonstrate a possible way to <strong>hard-rug</strong> with this contract</p><ol><li>Let people buy SRA allocation in exchange of MIM with deposit function.</li><li>Wallet Address use retreiveMim to withdraw all MIM to the owner address<br><strong>(The team will need to convince 1 of the 3rd Party)</strong></li><li>Wallet Address use transfer to withdraw all MIM to the owner address<br><strong>(The team will need to convince 1 of the 3rd Party)</strong></li><li>Owner never deploy/set up any liquidity or contract.</li></ol><p>Here we demonstrate a possible way to <strong>soft-rug</strong> with this contract</p><ol><li>Let people buy SRA allocation in exchange of MIM with deposit function.</li><li>Deploy OHM fork normally and allow claiming of SRA</li><li>Wallet address 3/5 policy use <strong>unlimited minting</strong> of SRA via token minting then gradually dump minted SRA to the market by setVault and mint.<br><strong>(The team will need to convince 1 of the 3rd Party)</strong></li></ol><p>Here we demonstrate a possible way to <strong>stuck-rug</strong> with this contract</p><ol><li>Let people buy SRA allocation in exchange of MIM with deposit function.</li><li>Something happen <strong>2 team and 1 of the 3rd party</strong> refused to do transaction.</li><li><strong>Fund stuck forever</strong> in the presale contract or the wallet address.</li></ol><p>If this helpful to you, you can <strong>tip</strong> me here</p><h3>Tip Address</h3><p><strong>[</strong>ERC20/BSC/AVAX(C-chain)/Polygon/FTM]<br>0xC1f2154ea0B0E5779Ff84bb11A5ed209Fd0741DF</p><p><strong>Follow me in Twitter</strong>: <a href="https://twitter.com/indyza_">https://twitter.com/indyza_</a></p><p><strong>Join Olympians Discord for discussion and code review request in (#</strong>🛠│code-talk): <a href="https://discord.gg/ucQwJZEmwa">https://discord.gg/ucQwJZEmwa</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=46a6e89f89ff" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>