Informational Audit Recommendations

Open
#285 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Stale
Tech stack
solidity
Domain
blockchain

Research direction

Start by locating Errors.sol, RateChangeQueue, the rail zeroing logic, the Solidity version configuration, and the NatSpec comment at L1144. Review each recommendation against current FEVM support and state-handling behavior, then verify that unused errors are removed, custom-error usage and zeroing are correct, the version is updated, and the caller documentation identifies the payer.

Written by the indexing model from the issue text.

Description

These are the best practices recommendations coming out of the composable audit

  1. Remove unused errors OnlyRailParticipantAllowed and FeeWithdrawalNativeTransferFailed from Errors.sol
  2. Use custom errors instead of revert strings. In particular RateChangeQueue is where we are doing this.
  3. Clear serviceFeeParticipant from rail struct when zeroing out rail -- I believe this one actually has some state usage impact since FVM is smart enough to release KAMT slots that point at zero values and we are not correctly zeroing out rail struct values as we intended
  4. Update solidity version to 0.8.33 -- Im not sure the state of FEVM support but I think we should be mostly current thanks to filb's work
  5. Update the NatSpec comment at L1144 to correctly identify the caller as payer.

These are all items we should address whenever we deploy a new version.

Dominant language
Solidity
Stars
8
Forks
14
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from FilOzone/filecoin-pay

All issues in FilOzone/filecoin-pay

Similar issues

More Blockchain issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.