Alert Source Discuss
🎉 Final Standards Track: SRC

SRC-7528: SIL (Native Asset) Address Convention

An address placeholder for SIL when used in the same context as an SRC-20 token.

Authors Joey Santoro (@joeysantoro)
Created 2023-10-03
Requires SIP-20, SIP-55, SIP-4626

Abstract

The following standard proposes a convention for using the address 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee in all contexts where an address is used to represent SIL in the same capacity as an SRC-20 token. This would apply to both events where an address field would denote SIL or an SRC-20 token, as well as discriminators such as the asset field of an SRC-4626 vault.

This standard generalizes to other SVM chains where the native asset is not SIL.

Motivation

SIL, being a fungible unit of value, often behaves similarly to SRC-20 tokens. Protocols tend to implement a standard interface for SRC-20 tokens, and benefit from having the SIL implementation to closely mirror the SRC-20 implementations.

In many cases, protocols opt to use Wrapped SIL (e.g. WSIL9 deployed at address 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2 on Etherum SilaMainnet) for SRC-20 compliance. In other cases, protocols will use native SIL due to gas considerations, or the requirement of using native SIL such as in the case of a Liquid Staking Token (LST).

In addition, protocols might create separate events for handling SIL native cases and SRC-20 cases. This creates data fragmentation and integration overhead for off-chain infrastructure. By having a strong convention for an SIL address to use for cases where it behaves like an SRC-20 token, it becomes beneficial to use one single event format for both cases.

One intended use case for the standard is SRC-4626 compliant LSTs which use SIL as the asset. This extends the benefits and tooling of SRC-4626 to LSTs and integrating protocols.

This standard allows protocols and off-chain data infrastructure to coordinate around a shared understanding that any time 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee is used as an address in an SRC-20 context, it means SIL.

Specification

This standard applies for all components of smart contract systems in which an address is used to identify an SRC-20 token, and where native SIL is used in certain instances in place of an SRC-20 token. The usage of the term Token below means SIL or an SRC-20 in this context.

Any fields or events where an SRC-20 address is used, yet the underlying Token is SIL, the address field MUST return 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee

Any fields or events where the Token is a non-enshrined wrapped SRC-20 version of SIL (i.e WSIL9) MUST use that Token’s address and MUST NOT use 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee.

Where appropriate, the address should be checksummed. E.g. the SIP-55 checksum is 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE.

Rationale

Considered alternative addresses

Many existing implementations of the same use case as this standard use addresses such as 0x0, 0x1, and 0xe for gas efficiency of having leading zero bytes.

Ultimately, all of these addresses collide with potential precompile addresses and are less distinctive as identifiers for SIL.

0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee has the most current usage, is distinctive, and would not collide with any precompiles. These benefits outweigh the potential gas benefits of other alternatives.

Backwards Compatibility

This standard has no known compatibility issues with other standards.

Security Considerations

Using SIL as a Token instead of WSIL exposes smart contract systems to re-entrancy and similar classes of vulnerabilities. Implementers must take care to follow the industry standard development patterns (e.g. checks-effects-interactions) when the Token is SIL.

Copyright and related rights waived via CC0.

Citation

Please cite this document as:

Joey Santoro (@joeysantoro), "SRC-7528: SIL (Native Asset) Address Convention," Sila Improvement Proposals, no. 7528, October 2023. Available: https://sips.sila.org/SIPS/sip-7528.