<?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 Jong Seok Park on Medium]]></title>
        <description><![CDATA[Stories by Jong Seok Park on Medium]]></description>
        <link>https://medium.com/@jongseok.park?source=rss-15aa3d129cce------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*-URqXA3GvxUmv8_hxpBsUg.jpeg</url>
            <title>Stories by Jong Seok Park on Medium</title>
            <link>https://medium.com/@jongseok.park?source=rss-15aa3d129cce------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 04:41:45 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@jongseok.park/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[Unusual checking logic of Harvest’s CRYStrategy]]></title>
            <link>https://medium.com/@jongseok.park/unusual-checking-logic-of-harvests-crystrategy-190f0d13814d?source=rss-15aa3d129cce------2</link>
            <guid isPermaLink="false">https://medium.com/p/190f0d13814d</guid>
            <category><![CDATA[defi]]></category>
            <category><![CDATA[bugs]]></category>
            <dc:creator><![CDATA[Jong Seok Park]]></dc:creator>
            <pubDate>Wed, 16 Sep 2020 10:55:43 GMT</pubDate>
            <atom:updated>2020-09-16T10:58:20.939Z</atom:updated>
            <content:encoded><![CDATA[<h3>Unusual checking logic of Harvest.finance’s CRYStrategy</h3><p>There is a need to verify depositArbCheck function in CRVStrategyStable.sol.</p><pre>function depositArbCheck() public view returns(bool) {</pre><pre>uint256 currentPrice = underlyingValueFromYCrv(ycrvUnit);</pre><pre>if (currentPrice &gt; curvePriceCheckpoint) {</pre><pre>return currentPrice.mul(100).div(curvePriceCheckpoint) &gt; 100 - arbTolerance;</pre><pre>} else {</pre><pre>return curvePriceCheckpoint.mul(100).div(currentPrice) &gt; 100 - arbTolerance;</pre><pre>}</pre><pre>}</pre><p>Since the arbTolerance variable is uint256 type, this function always returns true if the variable is non-zero.</p><p>I have concerns if it is really what the team intended? Or is it a bug?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=190f0d13814d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Sushiswap delegation double spending bug.]]></title>
            <link>https://medium.com/bulldax-finance/sushiswap-delegation-double-spending-bug-5adcc7b3830f?source=rss-15aa3d129cce------2</link>
            <guid isPermaLink="false">https://medium.com/p/5adcc7b3830f</guid>
            <category><![CDATA[defi-labs]]></category>
            <category><![CDATA[sushiswap]]></category>
            <category><![CDATA[cryptocurrency]]></category>
            <category><![CDATA[defi]]></category>
            <dc:creator><![CDATA[Jong Seok Park]]></dc:creator>
            <pubDate>Mon, 07 Sep 2020 09:20:04 GMT</pubDate>
            <atom:updated>2020-09-07T09:26:54.298Z</atom:updated>
            <content:encoded><![CDATA[<p>Sushiswap governance allows token holders to give voting power to a delegatee. However, in the case of Sushiswap, voting power stays with the delegatee even when the token holder transfers the tokens from the wallet. In this case, the voting delegation should disappear. Instead, the voting power can be inflated with delegate &amp; transfer transactions.</p><p>Here is a short test code.</p><pre>await this.sushi.mint(alice, &#39;100&#39;, { from: alice });</pre><pre>await this.sushi.delegate(donas, {from: alice});<br>await this.sushi.transfer(bob, &#39;100&#39;, {from: alice} );</pre><pre>await this.sushi.delegate(donas, {from: bob});<br>await this.sushi.transfer(carol, &#39;100&#39;, {from: bob} );</pre><pre>await this.sushi.delegate(donas, {from: carol});<br>await this.sushi.transfer(alice, &#39;100&#39;, {from: carol} );</pre><pre>console.log(&quot;totalSupply&quot;, (await this.sushi.totalSupply()).toString());<br>console.log(&quot;donas votes&quot;, (await this.sushi.getCurrentVotes(donas)).toString());</pre><p>The result of this code is as follows.</p><pre>totalSupply 100<br>donas votes 300</pre><p>In other words, if a total supply is 100, then donas voting power should stay at 100. However, due to the double-spend bug, his voting power becomes 300. By repeating the process, a user can increase the voting power.</p><p>In the Compound’s Comp.sol which has a similar delegate mechanism, there is the following code that transfers delegate authority when sending a token.</p><pre>function _transferTokens(address src, address dst, uint96 amount) internal {<br>require(src != address(0), &quot;Comp::_transferTokens: cannot transfer from the zero address&quot;);<br>require(dst != address(0), &quot;Comp::_transferTokens: cannot transfer to the zero address&quot;);</pre><pre>balances[src] = sub96(balances[src], amount, &quot;Comp::_transferTokens: transfer amount exceeds balance&quot;);<br>balances[dst] = add96(balances[dst], amount, &quot;Comp::_transferTokens: transfer amount overflows&quot;);</pre><pre>emit Transfer(src, dst, amount);</pre><pre>_moveDelegates(delegates[src], delegates[dst], amount);</pre><pre>}</pre><p>_moveDelegates has to be added to the Sushiswap smart contract when transferring the token.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5adcc7b3830f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/bulldax-finance/sushiswap-delegation-double-spending-bug-5adcc7b3830f">Sushiswap delegation double spending bug.</a> was originally published in <a href="https://medium.com/bulldax-finance">bulldax.finance</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>