<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Operate: Supply or withdraw on</title><link>https://rajkoz.com/posts/fluid-vault-smart-contracts-deep-dive/3-liquidity-layer/7-supply-or-withdraw/</link><description>Recent content in Operate: Supply or withdraw on</description><generator>Hugo -- 0.152.2</generator><language>en-us</language><atom:link href="https://rajkoz.com/posts/fluid-vault-smart-contracts-deep-dive/3-liquidity-layer/7-supply-or-withdraw/index.xml" rel="self" type="application/rss+xml"/><item><title>Supply or withdraw</title><link>https://rajkoz.com/posts/fluid-vault-smart-contracts-deep-dive/3-liquidity-layer/7-supply-or-withdraw/supply-or-withdraw/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://rajkoz.com/posts/fluid-vault-smart-contracts-deep-dive/3-liquidity-layer/7-supply-or-withdraw/supply-or-withdraw/</guid><description>&lt;p&gt;This is the complete body of the function we are analyzing.&lt;/p&gt;
&lt;figure&gt;
&lt;img loading="lazy" src="https://rajkoz.com/fluid-vault/liquidity-layer/supply-or-withdraw-full-function.png"
alt="Liquidity layer" width="100%"/&gt;
&lt;/figure&gt;
&lt;p&gt;We can group it into 7 main parts labeled on the image, which we are going to analyze separately. But before we do that, we are going to introduce the concept of &lt;code&gt;decay amount&lt;/code&gt;, which is the concept whose implementation represents the majority of the code above.&lt;/p&gt;
&lt;h2 id="what-is-decay-amount-and-decay-duration"&gt;What is decay amount and decay duration?&lt;/h2&gt;
&lt;p&gt;On the previous page, we analyzed withdrawal limits. So let&amp;rsquo;s quickly recall it with one example.&lt;/p&gt;</description></item><item><title>Withdrawal limits</title><link>https://rajkoz.com/posts/fluid-vault-smart-contracts-deep-dive/3-liquidity-layer/7-supply-or-withdraw/withdrawal-limits/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://rajkoz.com/posts/fluid-vault-smart-contracts-deep-dive/3-liquidity-layer/7-supply-or-withdraw/withdrawal-limits/</guid><description>&lt;p&gt;In order to prevent sudden liquidity changes and improve security, Fluid introduces the concept of withdrawal limits.&lt;/p&gt;
&lt;p&gt;Withdrawal limits are a mechanism through which a user can&amp;rsquo;t withdraw all liquidity at once if it is above some base limit. Instead, the liquidity is gradually freed up by a certain percentage over a defined time duration.&lt;/p&gt;
&lt;p&gt;The base limit controls when withdrawal limits are applied. If the supplied amount is lower than the base limit, then the whole amount of liquidity can be withdrawn at once. This ensures that lower supply amounts can be withdrawn fully because their impact on liquidity is negligible, while higher supply amounts must first go through partial withdrawals.&lt;/p&gt;</description></item></channel></rss>