<p>You can find an answer with an example here:
<a href="https://gist.github.com/justmoon/8597643" rel="nofollow noreferrer">https://gist.github.com/justmoon/8597643</a></p>
<blockquote>
<p>Type 0x01 means demurraging currency:</p>
<p>01 __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __</p>
<p>CURCODE- DATE------- RATE------------------- RESERVED---</p>
<p>CURCODE - Three character uppercase ASCII.</p>
<p>DATE - DEPRECATED Demurrage start date (Ripple epoch; seconds since 2000) -&gt; There is no reason to choose one reference date over another so this feature will be removed.</p>
<p>For now just make sure you ALWAYS set the date to 00 00 00 00</p>
<p>RATE - Demurrage rate, defined as e-folding time in seconds
(IEEE 754 double-precision floating-point)</p>
<p>RESERVED - Reserved for
future use, duh</p>
<p>Note: Date and rate are four-byte aligned, rate is eight-byte aligned,
for easy parsing on 32/64 bit CPUs.</p>
<p>Demurrage example:</p>
<p>01 58 41 55 00 00 00 00 C1 F7 6F F6 EC B0 BA C6 00 00 00 00</p>
<p>// Calculating the demurrage rate //</p>
<p>// We want 0.5% per year. There
are 31536000 in a year, so the e-folding time in seconds is:</p>
<p>31536000 / ln(0.995) = -6291418827.045599</p>
<p>// In plain English: The nominal amount of this asset will decrease
(hence the minus sign) e times (≈2.71828) every 6291418827.045599
seconds</p>
<p>// As hex (IEEE double):
<a href="http://gregstoll.dyndns.org/%7Egregstoll/floattohex/" rel="nofollow noreferrer">http://gregstoll.dyndns.org/~gregstoll/floattohex/</a></p>
<p>0xc1f76ff6ecb0bac6</p>
<p>// Final currency code 0158415500000000C1F76FF6ECB0BAC600000000</p>
<p>// Example TrustSet
{&quot;Flags&quot;:131072,&quot;TransactionType&quot;:&quot;TrustSet&quot;,&quot;Account&quot;:&quot;rNb721TdNHN37yoURrMYDiQFmvXmENCZW6&quot;,&quot;LimitAmount&quot;:{&quot;value&quot;:&quot;1000&quot;,&quot;currency&quot;:&quot;0158415500000000C1F76FF6ECB0BAC600000000&quot;,&quot;issuer&quot;:&quot;rUyPiNcSFFj6uMR2gEaD8jUerQ59G1qvwN&quot;}}</p>
</blockquote>
<ol>
<li>Create the code for your currency as shown.</li>
<li>Set a Trustline for this currency (As shown in the end of the quote)</li>
</ol>
<p>Thats it, it's created now.</p>
<p>P.S.: For now I know the only one place where this currencies are shown correctly:
<a href="https://bithomp.com/explorer/forabc" rel="nofollow noreferrer">https://bithomp.com/explorer/forabc</a></p>

CC BY-SA 3.0
2016-02-08T20:09:09.843Z
2016-02-08T20:09:09.843Z
2020-06-16T11:10:03.350Z
Viacheslav Bakshaev
<p>The Ripple wiki has a page about <a href="https://ripple.com/wiki/Gateway_demurrage" rel="nofollow">demurrage currencies</a> being a possibility in Ripple. However, it's not entirely clear whether this feature is already implemented in the server or client, and if so, how to properly use it.</p>

<p>Can one create a demurrage currency in Ripple, and if so, how does one do it?</p>

CC BY-SA 3.0
2014-07-13T01:29:00.883Z
I'm fairly certain that demurrage support is not completed in the client yet but that it is expected to be one of the next (if not, the next) significant feature rolled out.
David Schwartz
<protocol><ripple><currencies>
Is demurrage already integrated into Ripple? If so, how does one create a demurrage currency?
ThePiachu
# Is demurrage already integrated into Ripple? If so, how does one create a demurrage currency?

(Asked by: username_0 on 2014-07-12)

The Ripple wiki has a page about [demurrage currencies](https://ripple.com/wiki/Gateway_demurrage) being a possibility in Ripple. However, it's not entirely clear whether this feature is already implemented in the server or client, and if so, how to properly use it.

Can one create a demurrage currency in Ripple, and if so, how does one do it?

**Tags:** protocol, ripple, currencies

> **Comments:**
> **username_1**: I'm fairly certain that demurrage support is not completed in the client yet but that it is expected to be one of the next (if not, the next) significant feature rolled out.  

---

## 1 answers

### Answer by username_2 on 2016-02-08. Score: 1 | Accepted answer

You can find an answer with an example here:
<https://gist.github.com/justmoon/8597643>

> Type 0x01 means demurraging currency:
>
> 01 \_\_ \_\_ \_\_ \_\_ \_\_ \_\_ \_\_ \_\_ \_\_ \_\_ \_\_ \_\_ \_\_ \_\_ \_\_ \_\_ \_\_ \_\_ \_\_
>
> CURCODE- DATE------- RATE------------------- RESERVED---
>
> CURCODE - Three character uppercase ASCII.
>
> DATE - DEPRECATED Demurrage start date (Ripple epoch; seconds since 2000) -> There is no reason to choose one reference date over another so this feature will be removed.
>
> For now just make sure you ALWAYS set the date to 00 00 00 00
>
> RATE - Demurrage rate, defined as e-folding time in seconds
> (IEEE 754 double-precision floating-point)
>
> RESERVED - Reserved for
> future use, duh
>
> Note: Date and rate are four-byte aligned, rate is eight-byte aligned,
> for easy parsing on 32/64 bit CPUs.
>
> Demurrage example:
>
> 01 58 41 55 00 00 00 00 C1 F7 6F F6 EC B0 BA C6 00 00 00 00
>
> // Calculating the demurrage rate //
>
> // We want 0.5% per year. There
> are 31536000 in a year, so the e-folding time in seconds is:
>
> 31536000 / ln(0.995) = -6291418827.045599
>
> // In plain English: The nominal amount of this asset will decrease
> (hence the minus sign) e times (≈2.71828) every 6291418827.045599
> seconds
>
> // As hex (IEEE double):
> [http://gregstoll.dyndns.org/~gregstoll/floattohex/](http://gregstoll.dyndns.org/%7Egregstoll/floattohex/)
>
> 0xc1f76ff6ecb0bac6
>
> // Final currency code 0158415500000000C1F76FF6ECB0BAC600000000
>
> // Example TrustSet
> {"Flags":131072,"TransactionType":"TrustSet","Account":"rNb721TdNHN37yoURrMYDiQFmvXmENCZW6","LimitAmount":{"value":"1000","currency":"0158415500000000C1F76FF6ECB0BAC600000000","issuer":"rUyPiNcSFFj6uMR2gEaD8jUerQ59G1qvwN"}}

1. Create the code for your currency as shown.
2. Set a Trustline for this currency (As shown in the end of the quote)

Thats it, it's created now.

P.S.: For now I know the only one place where this currencies are shown correctly:
<https://bithomp.com/explorer/forabc>


---

