Omniscia Boson Protocol Audit
FundsBase Code Style Findings
FundsBase Code Style Findings
FBE-01C: Inconsistent SPDX License Specifier
| Type | Severity | Location |
|---|---|---|
| Standard Conformity | ![]() | FundsBase.sol:L1 |
Description:
All contracts in the codebase employ the GPL-3.0-or-later license specifier yet the FundsBase contract specifies the MIT license.
Example:
1// SPDX-License-Identifier: MITRecommendation:
We advise this inconsistency to either be addressed by updating the SPDX license specifier of FundsBase or to be documented as to why it exists.
Alleviation (8fccc2716047809e4bc7786c95d346e5c61b2896):
The license of the file has been updated to GPL-3.0-or-later as recommended.
FBE-02C: Unconditional Discard of Transient Queue
| Type | Severity | Location |
|---|---|---|
| Gas Optimization | ![]() | FundsBase.sol:L496 |
Description:
The meta-transaction authorization consumption queue introduced to support x402 payment gateways has resulted in a token transfer authorization queue being discarded on each inward fund transfer.
As a result, a redundant gas overhead is observed for all non-meta-transaction interactions that is currently inefficiently imposed.
Example:
492} else {493 // Zero-amount pull: no transfer happens, but still advance the queue494 // head so the off-chain caller can supply a queue whose layout is495 // independent of runtime amounts. No-op if no queue is loaded.496 TokenTransferAuthorizationLib.discardNext();497}Recommendation:
We advise the discard of the next authorization to be performed solely when a queue is detected, reducing the no-op gas cost path (which is assumed to be the most frequent one) by 100 gas due to reducing the TLOAD instructions from two to one.
Alleviation (8fccc2716047809e4bc7786c95d346e5c61b2896):
The Boson Protocol team opted to apply this optimization by updating the TokenTransferAuthorizationLib::discardNext function to check the length internally, optimizing the code's gas cost.
