# Understanding SRC-3: Mint and Burn

**URL:** <https://forum.fuel.network/t/understanding-src-3-mint-and-burn/5282>\
**Category:** General\
**Created:** [May 11, 2024, 4:49pm UTC](https://forum.fuel.network/t/understanding-src-3-mint-and-burn/5282 "2024-05-11T16:49:55Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![prberg](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/prberg/32/1612_2.png) [@prberg](https://forum.fuel.network/u/prberg)\
**Post date:** [May 11, 2024, 4:49pm UTC](https://forum.fuel.network/t/understanding-src-3-mint-and-burn/5282/1 "2024-05-11T16:49:55Z")

</div>

There appear to be several contradictory statements in [SRC-3](https://github.com/FuelLabs/sway-standards/blob/a001d3c248595112aae67e5633a06ef9bc0536ae/SRCs/src-3.md):

> Any contract that implements the SRC-3 standard MUST implement the [SRC-20](https://github.com/FuelLabs/sway-standards/blob/master/SRCs/src-20.md) standard.

And:

> Rationale  
> This standard has been added to enable compatibility between applications and allow minting and burning native assets per use case. This standard has been separated from the SRC-20 standard to allow for the minting and burning for all fungible assets, irrelevant of whether they are Native Assets or not.

If all SRC-3 implementors must implement SRC-20, too, what’s the point of separating the minting and burning logic?

How can a non-native fungible asset implement SRC-3 if they also have to implement SRC-20?

---

<div class="post-metadata">

**Author:** ![nick](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/nick/32/2330_2.png) [@nick](https://forum.fuel.network/u/nick)\
**Post date:** [May 11, 2024, 7:30pm UTC](https://forum.fuel.network/t/understanding-src-3-mint-and-burn/5282/2 "2024-05-11T19:30:35Z")

</div>

Not to speak for the specs team here, but I believe the reason is that minting may come from different places that are non-standard, while still holding an SRC20 compliant ABI.

An example of this is this Constant Product AMM example, where the LP tokens are minted as a by-product of _add\_liquidity_ and _burn\_liquidity_ and not _mint_ or _burn_.

This is a good example of where further compartmentalization of the specifications is useful as you can cover more cases with more granular standards.

Constant Product AMM Example:

> <https://gist.github.com/SilentCicero/4091cd92defc2d7b2b5dd920f482b607>

---

<div class="post-metadata">

**Author:** ![prberg](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/prberg/32/1612_2.png) [@prberg](https://forum.fuel.network/u/prberg)\
**Post date:** [May 11, 2024, 9:07pm UTC](https://forum.fuel.network/t/understanding-src-3-mint-and-burn/5282/3 "2024-05-11T21:07:14Z")

</div>

Thanks, @nick!

I don’t understand how this `ConstantProductAMM` contract is compliant with SRC-3. The standard says that the `mint` and `burn` functions must be implemented, but in this case, they aren’t - `add_liquidity` and `remove_liquidity` are implemented instead.

If the answer is “the contract isn’t compliant with SRC-3”, what’s the point of the standard, and why bother calling these `mint` and `burn` utilities an SRC?

---

<div class="post-metadata">

**Author:** ![nick](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/nick/32/2330_2.png) [@nick](https://forum.fuel.network/u/nick)\
**Post date:** [May 12, 2024, 12:34pm UTC](https://forum.fuel.network/t/understanding-src-3-mint-and-burn/5282/4 "2024-05-12T12:34:00Z")

</div>

Ah, I was only highlighting an example where you could have an SRC20 contract without using SRC3.

The point of separating them is that you can have contracts like the Constant Product AMM where you want to be able to inherit SRC20 but not the burn and mint logic of SRC3.

But I’d let @david expand on this further.

---

<div class="post-metadata">

**Author:** ![prberg](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/prberg/32/1612_2.png) [@prberg](https://forum.fuel.network/u/prberg)\
**Post date:** [May 13, 2024, 10:19am UTC](https://forum.fuel.network/t/understanding-src-3-mint-and-burn/5282/5 "2024-05-13T10:19:46Z")

</div>

Thanks for your answer, @nick.

So the Constant Product AMM is _using_ the SRC-3 burn and mint logic under the hood, but is not _inheriting_ it.

Thus, my question - is it really worth it to standardize these internal functions as an SRC? Sorry if I come across as rude, but that seems overkill to me.

Wouldn’t enshrining them in the standard library have been sufficient? Just like how the [`ERC-20 mint`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/52c36d412e8681053975396223d0ea39687fe33b/contracts/token/ERC20/ERC20.sol#L221-L226) logic has been implemented and maintained by OpenZeppelin over time.

---

<div class="post-metadata">

**Author:** ![nick](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/nick/32/2330_2.png) [@nick](https://forum.fuel.network/u/nick)\
**Post date:** [May 13, 2024, 12:32pm UTC](https://forum.fuel.network/t/understanding-src-3-mint-and-burn/5282/6 "2024-05-13T12:32:55Z")

</div>

So this contract has minting and burning functionality, but doesn’t inherit SRC3.

I think the idea behind SRC3 is that if a contract can conform to it’s pattern, it’s useful for making minting and burning a standardized interface. Of course, some cases will not be covered by this ABI so it’s not right for everything.

You might be right that it could be considered overkill, but we are trying to get ahead of obvious minting and burning cases where these ABIs may fulfill a vast majority of cases.

I think this standard is useful even just for example purposes for Sway.

Again, curious to hear what @david has to say.

---

<div class="post-metadata">

**Author:** ![david](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/david/32/32_2.png) [@david](https://forum.fuel.network/u/david)\
**Post date:** [May 14, 2024, 3:40pm UTC](https://forum.fuel.network/t/understanding-src-3-mint-and-burn/5282/7 "2024-05-14T15:40:07Z")

</div>

> [@prberg](#):
>
> So the Constant Product AMM is _using_ the SRC-3 burn and mint logic under the hood

SRC-3 only defines the contract interface, not the logic. Same pattern as ERC standards, which typically only enforce interfaces, not implementations.

So the AMM nick described only implements SRC-20, not SRC-3.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex022/uploads/fuel/original/2X/5/57d5a345cc15a64b636e0d56e042857f8a0e80b1.png) [@system](https://forum.fuel.network/u/system)\
**Post date:** [June 4, 2024, 11:40am UTC](https://forum.fuel.network/t/understanding-src-3-mint-and-burn/5282/8 "2024-06-04T11:40:56Z")

</div>

Closed on June 4, 2024, 11:40am UTC

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.
