Download audit report
This document presents the security review performed by Nethermind on the Starknet ID Auto Renew Contract. The reviewed contracts implement an automatic renewal feature for domain ownership, ensuring a seamless and continuous user experience.
The audited code consists of 245 lines of Cairo code. The audit was performed using (a) manual analysis of the codebase, (b) simulation of the smart contract, and (c) creation of test cases.
| Audit assessment | |
| Audit Type | Security Review |
| Initial Report | Aug. 24, 2023 |
| Response from Client | Sep 30, 2023 |
| Final Report | Oct 4, 2023 |
| Methods | Manual Review, Automated Analysis |
| Repository | Starknet ID |
| Commit Hash (Audit) | 71f58bca69 |
| Commit Hash (Reaudit) | e1830508e0 5284970d3d 8bc436b8a8 1ffcf57289 9ef5b7cd44 |
| Documentation Assessment | High |
| Test Suite Assessment | High |
Findings by severity
| # | Contract | LoC | Comments | Ratio | Blank | Total |
| 1 | src/lib.cairo | 2 | 1 | 50.0% | 0 | 3 |
| 2 | src/auto_renewal.cairo | 243 | 99 | 40.7% | 43 | 385 |
| Total | 245 | 100 | 40.8% | 43 | 388 |
| # | Finding | Severity | Update |
| 1 | Function update_tax_contract(...) is changing the contract owner | High | Fixed |
| 2 | Not using a two-step process for transferring ownership | Low | Fixed |
| 3 | Possible unnecessary spending of user funds | Low | Fixed |
| 4 | tax_price can be greater than limit_price | Low | Fixed |
| 5 | Parameter metadata can be changed by a whitelisted caller. | Info | Acknowledged |
| 6 | Generic error messages for pop operations | Best Practices | Fixed |
| 7 | Missing tax_price and metadata in the event DomainRenewed | Best Practices | Fixed |
| 8 | Missing events emission | Best Practices | Fixed |
| 9 | Storage variable _is_renewing can be more optimized. | Best Practices | Fixed |
| 10 | Storage variables can be constant | Best Practices | Acknowledged |
The audit covers the AutoRenewal smart contract. This contract manages domain renewals for the Starknet.id system. The contract emits the following events.
#[event]
#[derive(Drop, starknet::Event)]
enum Event {
EnabledRenewal: EnabledRenewal,
DisabledRenewal: DisabledRenewal,
DomainRenewed: DomainRenewed,
}
#[derive(Drop, starknet::Event)]
struct EnabledRenewal {
#[key]
domain: felt252,
renewer: ContractAddress,
limit_price: u256,
meta_hash: felt252,
}
#[derive(Drop, starknet::Event)]
struct DisabledRenewal {
#[key]
domain: felt252,
renewer: ContractAddress,
limit_price: u256,
}
#[derive(Drop, starknet::Event)]
struct DomainRenewed {
#[key]
domain: felt252,
renewer: ContractAddress,
days: felt252,
limit_price: u256,
timestamp: u64,
}The contract uses the following imports.
use starknet::ContractAddress;
use starknet::{get_caller_address, get_contract_address, get_block_timestamp};
use starknet::contract_address::ContractAddressZeroable;
use traits::{TryInto, Into};
use option::OptionTrait;
use array::ArrayTrait;
use integer::u64_try_from_felt252;
use debug::PrintTrait;
use openzeppelin::token::erc20::interface::{IERC20CamelDispatcher, IERC20CamelDispatcherTrait};
use naming::interface::naming::{INamingDispatcher, INamingDispatcherTrait};And the following storage variables.
#[storage]
struct Storage {
naming_contract: ContractAddress,
erc20_contract: ContractAddress,
tax_contract: ContractAddress,
admin: ContractAddress,
whitelisted_renewer: ContractAddress,
can_renew: bool,
// (renewer, domain, limit_price) -> 1 or 0
_is_renewing: LegacyMap::<(ContractAddress, felt252, u256), bool>,
// (renewer, domain) -> timestamp
last_renewal: LegacyMap::<(ContractAddress, felt252), u64>,
}The contract has the following getters.
fn is_renewing(
self: @ContractState, domain: felt252, renewer: ContractAddress, limit_price: u256
) -> bool {
self._is_renewing.read((renewer, domain, limit_price))
}
fn get_contracts(
self: @ContractState
) -> (ContractAddress, ContractAddress, ContractAddress) {
(self.naming_contract.read(), self.erc20_contract.read(), self.tax_contract.read())
}The function enable_renewals(...) allows the caller to renew a given domain given a limit_price. The function is shown below.
fn enable_renewals(ref self: ContractState, domain: felt252, limit_price: u256, meta_hash: felt252)
{
let caller = get_caller_address();
self._is_renewing.write((caller, domain, limit_price), true);
// we erase the previous renewal date
self.last_renewal.write((caller, domain), 0);
self.emit( Event::EnabledRenewal( EnabledRenewal { domain, renewer: caller, limit_price, meta_hash }))
}The caller can also disable renewals for a given domain and limit_price by calling the function below.
fn disable_renewals(ref self: ContractState, domain: felt252, limit_price: u256) {
let caller = get_caller_address();
self._is_renewing.write((caller, domain, limit_price), false);
self.emit( Event::DisabledRenewal( DisabledRenewal { domain, renewer: caller, limit_price, } ))
}Function renew(...): Only the whitelisted_renewer can call this function for domain renewals. The function applies several checks to evaluate if the current contract is not disabled, the domain can be renewed, the domain is not renewed yet in the current year, and the domain expires within a month. The function also updates when the last renewal was applied to avoid charging more than once a year. Then, the flow capacity (limit price amount) is taken from the user account and transferred to the contract. The tax price is transferred to the tax contract, and the expiration date is renewed for the next year.
fn renew( ref self: ContractState, root_domain: felt252, renewer: ContractAddress,
limit_price: u256, tax_price: u256, metadata: felt252,
) {
assert(self.can_renew.read(), 'Contract is disabled');
assert( get_caller_address() == self.whitelisted_renewer.read(), 'You are not whitelisted' );
self._renew(root_domain, renewer, limit_price, tax_price, metadata);
}
fn _renew( ref self: ContractState, root_domain: felt252, renewer: ContractAddress,
limit_price: u256, tax_price: u256, metadata: felt252,
) {
let naming = self.naming_contract.read();
let can_renew = self._is_renewing.read((renewer, root_domain, limit_price));
assert(can_renew, 'Renewal not toggled for domain');
// Check domain has not been renew yet this year
let block_timestamp = get_block_timestamp();
let last_renewed = self.last_renewal.read((renewer, root_domain));
// 364 because we keep adding one day margin to the existing month,
// if we take more than a day to renew, the margin will shrink.
assert(block_timestamp - last_renewed > 86400_u64 * 364_u64, 'Domain already renewed');
// Check domain is set to expire within a month
let expiry: u64 = INamingDispatcher { contract_address: naming }
.domain_to_data(array![root_domain].span())
.expiry;
assert(expiry <= block_timestamp + (86400_u64 * 30_u64), 'Domain not set to expire');
// Renew domain
// last_renewal is updated before external contract calls to prevent reentrancy attacks
// if the naming contract was compromised
self.last_renewal.write((renewer, root_domain), block_timestamp);
// events are sent before calls to other contracts to prevent a reordering via reentrancy attack
self.emit( Event::DomainRenewed( DomainRenewed { domain: root_domain, renewed, days: 365, limit_price, timestamp: block_timestamp } ) );
let contract = get_contract_address();
let erc20 = self.erc20_contract.read();
let _tax_contract = self.tax_contract.read();
// Transfer limit_price (including tax), will be canceled if the tx fails
IERC20CamelDispatcher { contract_address: erc20 }.transferFrom(renewer, contract, limit_price);
// transfer tax price to the tax contract address
IERC20CamelDispatcher { contract_address: erc20 }.transfer(_tax_contract, tax_price);
//Spend the remaining money to renew the domain
//If something remains after this, it can be considered as lost by the user,
//We keep the ability to claim it back but can't guarantee we will do it
INamingDispatcher { contract_address: naming }.renew(root_domain, 365_u16, ContractAddressZeroable::zero(), 0, metadata);
}The function batch_renew(...): Only the whitelisted_renewer can call this function for batch domain renewals. The function applies the same checks described in renew(...). The difference relies only on the number of domains to be renewed.
fn batch_renew( ref self: ContractState, domain: array::Span::<felt252>, renewer: array::Span::<starknet::ContractAddress>, limit_price: array::Span::<u256>, tax_price: array::Span::<u256>, metadata: array::Span::<felt252>,
) {
assert(self.can_renew.read(), 'Contract is disabled');
assert(
get_caller_address() == self.whitelisted_renewer.read(), 'You are not whitelisted'
);
assert(domain.len() == renewer.len(), 'Domain & renewer mismatch len');
assert(domain.len() == limit_price.len(), 'Domain & price mismatch len');
let mut domain = domain;
let mut renewer = renewer;
let mut limit_price = limit_price;
let mut tax_price = tax_price;
let mut metadata = metadata;
loop {
if domain.len() == 0 {
break;
}
let _domain = domain.pop_front().expect('pop_front error');
let _renewer = renewer.pop_front().expect('pop_front error');
let _limit_price = limit_price.pop_front().expect('pop_front error');
let _tax_price = tax_price.pop_front().expect('pop_front error');
let _metadata = metadata.pop_front().expect('pop_front error');
self._renew(*_domain, *_renewer, *_limit_price, *_tax_price, *_metadata);
}
}The function claim(...): Only the admin can call this function to withdraw funds deposited in the contract.
fn claim(ref self: ContractState, amount: u256) {
assert(get_caller_address() == self.admin.read(), 'Caller not admin');
let erc20 = self.erc20_contract.read();
IERC20CamelDispatcher { contract_address: erc20 }.transfer(get_caller_address(), amount);
}The contract also has the following update functions.
// Admin function to update admin address and the tax contract address
fn update_admin(ref self: ContractState, new_admin: ContractAddress,) {
assert(get_caller_address() == self.admin.read(), 'Caller not admin');
self.admin.write(new_admin);
}
fn update_tax_contract(ref self: ContractState, new_addr: ContractAddress,) {
assert(get_caller_address() == self.admin.read(), 'Caller not admin');
self.admin.write(new_addr);
}
fn update_whitelisted_renewer(ref self: ContractState, whitelisted_renewer: starknet::ContractAddress) {
assert(get_caller_address() == self.admin.read(), 'Caller not admin');
self.whitelisted_renewer.write(whitelisted_renewer);
}
fn toggle_off(ref self: ContractState) {
assert(get_caller_address() == self.admin.read(), 'Caller not admin');
self.can_renew.write(false);
}The risk rating methodology used by Nethermind Security follows the principles established by the OWASP Foundation. The severity of each finding is determined by two factors: Likelihood and Impact.
Likelihood measures how likely the finding is to be uncovered and exploited by an attacker. This factor will be one of the following values:
When defining the likelihood of a finding, other factors are also considered. These can include but are not limited to motive, opportunity, exploit accessibility, ease of discovery, and ease of exploit.
Impact is a measure of the damage that may be caused if an attacker exploits the finding. This factor will be one of the following values:
When defining the impact of a finding, other factors are also considered. These can include but are not limited to data and state integrity, loss of availability, financial loss, and reputation damage. After defining the likelihood and impact of an issue, the severity is determined according to the table below.
| Impact / Likelihood | Low | Medium | High |
| High | Medium | High | Critical |
| Medium | Low | Medium | High |
| Low | Info / Best Practices | Low | Medium |
| Undetermined | Undetermined | Undetermined | Undetermined |
To address issues that do not fit a High, Medium or Low severity, Nethermind Security also uses three more finding severities: Informational, Best Practices, and Undetermined.
update_tax_contract(...) is changing the contract owner| File | Fix commit | Type | Status |
auto_renewal.cairo | PR #14 | High | Fixed |
The function update_tax_contract(...) is supposed to update the address of the tax contract. However, the function updates the admin address instead of the tax contract. Since the contract has no two-step process for transferring ownership, you effectively renounce or relinquish administrative control over the smart contract. If this happens in production, you remove the ability to execute administrative functions permanently and irreversibly. The function is reproduced below.
fn update_tax_contract(ref self: ContractState, new_addr: ContractAddress,) {
assert(get_caller_address() == self.admin.read(), 'Caller not admin');
///////////////////////////////////////////////////////////////////////////
// @audit Wrong storage variable. Should be "self.tax_contract.write(new_addr);"
///////////////////////////////////////////////////////////////////////////
self.admin.write(new_addr);
}Recommendation
Update the function as shown below.
fn update_tax_contract(ref self: ContractState, new_addr: ContractAddress,) {
assert(get_caller_address() == self.admin.read(), 'Caller not admin');
- self.admin.write(new_addr);
+ self.tax_contract.write(new_addr);
}Resolution
We updated the code according to the recommendation. Fixed in 9ef5b7cd44d67ae3799eba8989d571eea9ab0527.
| File | Fix commit | Type | Status |
auto_renewal.cairo | PR #16 | Low | Fixed |
The admin can be updated using the update_admin(...) function. However, the code does not use a two-step process for transferring ownership. A two-step process for transferring ownership in smart contracts enhances security, reduces the risk of errors, and provides a mechanism for verification and reversibility. It is a best practice that adds an extra layer of protection when controlling a contract needs to change hands. Transferring ownership of a smart contract means giving control over its functions and funds to a new entity or address. A two-step process typically involves two transactions: one to initiate the ownership transfer and another to confirm it. This separation allows for verification and validation of the transfer, reducing the risk of accidental or malicious transfers.
The first step usually involves initiating the transfer and confirming the intent, while the second step finalizes the transfer. This adds an extra layer of security because it ensures that the owner has consciously and deliberately chosen to transfer ownership, preventing unauthorized or accidental transfers. A two-step process often includes a time delay between the initiation and confirmation steps. This delay can act as a safeguard against sudden or unexpected transfers. It allows the current owner or other stakeholders to react if the transfer was initiated without proper authorization or in error.
If a mistake is discovered during the confirmation step or if there are concerns about the legitimacy of the transfer, it can be halted before it becomes irreversible. This flexibility is especially valuable when the consequences of an ownership transfer can be significant. The function is reproduced below.
// Admin function to update the admin address and the tax contract address
fn update_admin(ref self: ContractState, new_admin: ContractAddress,) {
//////////////////////////////////////////////////////////////////
// @audit Not using a two-step process for transferring ownership
//////////////////////////////////////////////////////////////////
assert(get_caller_address() == self.admin.read(), 'Caller not admin');
self.admin.write(new_admin);
}Recommendation
Adopt a two-step process for transferring ownership.
Resolution
We updated the code to adopt a two-step process via start_admin_update and confirm_admin_update. Fixed in: e1830508e0c310dc390684cc5cfc7517484bf2f4.
| File | Fix commit | Type | Status |
auto_renewal.cairo | PR #16 PR #18 | Low | Fixed |
The function _renew is called by external methods that can only be called by whitelisted_renewer, which is a centralized authority. This authority can decide tax prices. However, domain prices can also be changed by the authority on naming contracts if there is any case where that tax price or renewing cost is lowered from when users enable renewals. The user still pays the cost initially, but that amount is stuck in the contract and only claimable by the admin.
fn _renew(
ref self: ContractState, root_domain: felt252, renewer: ContractAddress, limit_price: u256, tax_price: u256, metadata: felt252,
) {
...
///////////////////////////////////////////////////////////////
// @audit-issue: The user always debited the amount of `limit_price`
// but that amount can differ from time to time.
///////////////////////////////////////////////////////////////
IERC20CamelDispatcher { contract_address: erc20 }
.transferFrom(renewer, contract, limit_price);
// transfer tax price to tax contract address
IERC20CamelDispatcher { contract_address: erc20 }.transfer(_tax_contract, tax_price);
...
}Recommendation
Consider calculating the current price of renewal (renewal cost + tax price) and then compare with limit_price. If it is lower or equal, then continue the flow and debit the user only the cost.
Resolution
We followed the suggestion.
Fixed in: 1ffcf572894514e14c20f0e973ca6fe2b4d05d5a, 8bc436b8a848354b21bab1785c06af1d83dc846d.
tax_price can be greater than limit_price| File | Fix commit | Type | Status |
auto_renewal.cairo | PR #16 PR #18 | Low | Fixed |
The whitelisted_renewer charges the renewal for domains by calling the functions renew(...) and batch_renew(...). These functions call the private function _renew(...) reproduced below.
fn _renew(
ref self: ContractState,
root_domain: felt252,
renewer: ContractAddress,
limit_price: u256,
tax_price: u256,
metadata: felt252,
) {
let naming = self.naming_contract.read();
let can_renew = self._is_renewing.read((renewer, root_domain, limit_price));
assert(can_renew, 'Renewal not toggled for domain');
...
IERC20CamelDispatcher { contract_address: erc20 }
.transferFrom(renewer, contract, limit_price);
///////////////////////////////////////////////////////////////////
// @audit ensure that "limit_price" is greater than "tax_price"
///////////////////////////////////////////////////////////////////
IERC20CamelDispatcher { contract_address: erc20 }.transfer(_tax_contract, tax_price);
...
}The function _renew(...) checks if the renewal for the specified domain and limit_price can be charged. Then, the limit_price amount is taken from the renewer account to the contract. After that, the tax_price is transferred to the tax_contract. As we can notice, the function does not check if the tax_price is less than or equal to the limit_price. When the tax_price exceeds the limit_price, funds deposited in the contract will be transferred to the tax_contract, and the user will not be charged the due amount.
Recommendation
Consider checking if tax_price is lesser or equal to the amount limit_price.
Resolution
We followed the next suggestion, which resolves this one. Fixed in: 1ffcf572894514e14c20f0e973ca6fe2b4d05d5a, and 8bc436b8a848354b21bab1785c06af1d83dc846d.
metadata can be changed by a whitelisted caller.| File | Fix commit | Type | Status |
auto_renewal.cairo | — | Info | Acknowledged |
Metadata passed to this function should be the same as users passed value to function enable_renewals(...). However, in this case, the caller can change this value, which can cause a mismatch in sensitive data on the backend.
fn renew(
ref self: ContractState,
root_domain: felt252,
renewer: ContractAddress,
limit_price: u256,
tax_price: u256,
metadata: felt252,
) {
...
self._renew(root_domain, renewer, limit_price, tax_price, metadata);
///////////////////////////////////////////////////////////////////
// @audit: Metadata is not the one that the user passes
// while enabling renewal. As we know it is a hash of sensitive
// data, but in this case, it is passed to this call via
// centralized caller or oracle(whitelisted_caller)
///////////////////////////////////////////////////////////////////
}Recommendation
Consider getting this data directly from the users’ parameter. It can be stored in storage and read back in this function. Also, whole data can be stored as a hash.
Resolution
We use metadata for accounting. We could decide not to provide the metadata (a hash of private data) given by the user, but that would be a problem for us, not the user.
| File | Fix commit | Type | Status |
auto_renewal.cairo | PR #16 | Best Practices | Fixed |
The function batch_renew(...) receives arrays for batch renewals, and their length needs to be the same. However, the length checking is not applied on the arrays tax_price and metadata. The function is reproduced below.
fn batch_renew(
ref self: ContractState,
domain: array::Span::<felt252>,
renewer: array::Span::<starknet::ContractAddress>,
limit_price: array::Span::<u256>,
tax_price: array::Span::<u256>,
metadata: array::Span::<felt252>,
) {
...
assert(domain.len() == renewer.len(), 'Domain & renewer mismatch len');
assert(domain.len() == limit_price.len(), 'Domain & price mismatch len');
...
loop {
if domain.len() == 0 {
break;
}
let _domain = domain.pop_front().expect('pop_front error');
let _renewer = renewer.pop_front().expect('pop_front error');
let _limit_price = limit_price.pop_front().expect('pop_front error');
////////////////////////////////////////////////////////
// @audit Error messages for tax_price and metadata pop operations are too
// generic.
////////////////////////////////////////////////////////
let _tax_price = tax_price.pop_front().expect('pop_front error');
let _metadata = metadata.pop_front().expect('pop_front error');
self._renew(*_domain, *_renewer, *_limit_price, *_tax_price, *_metadata);
}
}If tax_price or metadata is lesser than the other arrays, the operation reverts with a generic error message.
Recommendation
Consider customizing the error messages to identify where the error has occurred easily.
Resolution
We updated the code to check the missing arrays’ lengths and replaced the .expect() by unwrap(). Fixed in: e1830508e0c310dc390684cc5cfc7517484bf2f4.
tax_price and metadata in the event DomainRenewed| File | Fix commit | Type | Status |
auto_renewal.cairo | PR #16 | Best Practices | Fixed |
The event DomainRenewed keeps track of the domain, renewer, days, limit_price, and timestamp, as shown below.
#[derive(Drop, starknet::Event)]
struct DomainRenewed {
#[key]
domain: felt252,
renewer: ContractAddress,
days: felt252,
limit_price: u256,
timestamp: u64,
}This event is emitted in the function fn _renew(...). This function receives the root_domain, renewer, limit_price, tax_price, and metadata as input parameters. The function header is reproduced below.
fn _renew(
ref self: ContractState,
root_domain: felt252,
renewer: ContractAddress,
limit_price: u256,
tax_price: u256,
metadata: felt252,
)The code triggering the event is reproduced below.
self.emit(
Event::DomainRenewed(
DomainRenewed {
domain: root_domain,
renewer,
days: 365,
limit_price,
timestamp: block_timestamp
}
)
);We notice that the field days receives the constant 365. Maybe this field can be omitted. On the other hand, the fields tax_price and metadata are not part of the event.
Recommendation
We suggest that the development team discuss the possibility of removing the field days and adding the tax_price and metadata fields.
Resolution
We added the suggested relevant fields. Fixed in 5284970d3df79836c21debfe1cbd11ad3694bf52.
| File | Fix commit | Type | Status |
auto_renewal.cairo | PR #16 | Best Practices | Fixed |
Some important state transitions are not generating events. Events provide a way to log and broadcast important state changes and transactions within a smart contract. These events are recorded on the blockchain and can be publicly accessed and examined by anyone. Events also enable off-chain systems and applications to monitor and analyze the behavior of smart contracts. Below, we list the functions that could benefit from emitting events.
- fn constructor(...) {}
- fn update_admin(...) {}
- fn update_tax_contract(...) {}
- fn update_whitelisted_renewer(...) {}
- fn toggle_off(...) {}
- fn claim(...) {}Recommendation
We recommend that the development team carefully review the above functions and deliberate on which functions should emit events.
Resolution
We added an event to all the listed functions so users can easily track what happens to the contract. Fixed in: e1830508e0c310dc390684cc5cfc7517484bf2f4.
_is_renewing can be more optimized.| File | Fix commit | Type | Status |
auto_renewal.cairo | PR #16 | Best Practices | Fixed |
Using LegacyMap in Cairo done hashes in the background. Storage variable _is_renewing is LegacyMap with keys of 3 elements tuple. However, u256 type in Cairo is represented by two u128, so this mapping will have four elements tuple. To calculate the storage key of the _is_renewing variable, four Pedersen hashes and one keccak. Hash applications are one of the most expensive operations in Starknet.
#[storage]
struct Storage {
...
_is_renewing: LegacyMap::<(ContractAddress, felt252, u256), bool>,
/////////////////////////////////////////////////////////////////////
// @audit-issue: Calculation of key consumes following applications.
// p(p(p(p(keccak(_is_renewing),u256.high), u256.low,)
// felt252,) ContractAddress,) p: Pedersen Hash
/////////////////////////////////////////////////////////////////////
...
}It is better to optimize the storage variable, while this variable is just used to register users’ correct variables.
Recommendation
Consider using the following approach.
#[storage]
struct Storage {
...
_is_renewing: LegacyMap::<(ContractAddress, felt252), u256>,
/////////////////////////////////////////////////////////////////
// @audit-issue: Similar usage but instead of using u256 as key,
// it is used as a value.
/////////////////////////////////////////////////////////////////
}Resolution
We adopted the suggested approach. Fixed in e1830508e0c310dc390684cc5cfc7517484bf2f4.
| File | Fix commit | Type | Status |
auto_renewal.cairo | — | Best Practices | Acknowledged |
Storage variables with names: naming_contract and erc20_contract can be constants instead of stored in contract storage. These variables are assigned in the constructor and never changed again. Reading from storage causes unnecessary syscalls.
#[storage]
struct Storage {
naming_contract: ContractAddress,
erc20_contract: ContractAddress,
...
}Recommendation
Consider assigning these variables to contract-level constants.
Resolution
We understand the suggestion but prefer to keep on storage variables because it is not that expensive and allows us to test the contract more easily and use the same class hash on both testnet and mainnet.
Software documentation refers to the written or visual information that describes the functionality, architecture, design, and implementation of software. It provides a comprehensive overview of the software system and helps users, developers, and stakeholders understand how the software works, how to use it, and how to maintain it. Software documentation can take different forms, such as user manuals, system manuals, technical specifications, requirements documents, design documents, and code comments. Software documentation is critical in software development, enabling effective communication between developers, testers, users, and other stakeholders. It helps to ensure that everyone involved in the development process has a shared understanding of the software system and its functionality. Moreover, software documentation can improve software maintenance by providing a clear and complete understanding of the software system, making it easier for developers to maintain, modify, and update the software over time. Smart contracts can use various types of software documentation. Some of the most common types include:
These types of documentation are essential for smart contract development and maintenance. They help ensure that the contract is properly designed, implemented, and tested, and they provide a reference for developers who need to modify or maintain the contract in the future.
The Starknet.ID team has provided two sources of documentation. A README explaining all the implemented features and restrictions in the Auto renew contract. Business logic documentation can be found in https://docs.starknet.id/.
| 15Tests passed | 0Failed |
The complete test output is in the full report.
As auditors, we recommend that any changes or updates made to the audited codebase undergo a re-audit or security review to address potential vulnerabilities or risks introduced by the modifications. By conducting a re-audit or security review of the modified codebase, you can significantly enhance the overall security of your system and reduce the likelihood of exploitation. However, we do not possess the authority or right to impose obligations or restrictions on our clients regarding codebase updates, modifications, or subsequent audits. Accordingly, the decision to seek a re-audit or security review lies solely with you.
This report is based on the scope of materials and documentation provided by you to Nethermind in order that Nethermind could conduct the security review outlined in 1. Executive Summary and 2. Audited Files. The results set out in this report may not be complete nor inclusive of all vulnerabilities. Nethermind has provided the review and this report on an as-is, where-is, and as-available basis. You agree that your access and/or use, including but not limited to any associated services, products, protocols, platforms, content, and materials, will be at your sole risk. Blockchain technology remains under development and is subject to unknown risks and flaws. The review does not extend to the compiler layer, or any other areas beyond the programming language, or other programming aspects that could present security risks. This report does not indicate the endorsement of any particular project or team, nor guarantee its security. No third party should rely on this report in any way, including for the purpose of making any decisions to buy or sell a product, service or any other asset. To the fullest extent permitted by law, Nethermind disclaims any liability in connection with this report, its content, and any related services and products and your use thereof, including, without limitation, the implied warranties of merchantability, fitness for a particular purpose, and non-infringement. Nethermind does not warrant, endorse, guarantee, or assume responsibility for any product or service advertised or offered by a third party through the product, any open source or third-party software, code, libraries, materials, or information linked to, called by, referenced by or accessible through the report, its content, and the related services and products, any hyperlinked websites, any websites or mobile applications appearing on any advertising, and Nethermind will not be a party to or in any way be responsible for monitoring any transaction between you and any third-party providers of products or services. As with the purchase or use of a product or service through any medium or in any environment, you should use your best judgment and exercise caution where appropriate. FOR AVOIDANCE OF DOUBT, THE REPORT, ITS CONTENT, ACCESS, AND/OR USAGE THEREOF, INCLUDING ANY ASSOCIATED SERVICES OR MATERIALS, SHALL NOT BE CONSIDERED OR RELIED UPON AS ANY FORM OF FINANCIAL, INVESTMENT, TAX, LEGAL, REGULATORY, OR OTHER ADVICE.
The Leading Engineers of Blockchain Infrastructure