Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Features for 07/22 Audit #20

Merged
merged 15 commits into from
Aug 25, 2024
Merged

New Features for 07/22 Audit #20

merged 15 commits into from
Aug 25, 2024

Conversation

jparklev
Copy link
Contributor

@jparklev jparklev commented Jul 18, 2024

  • Add pToken minting fee
  • Add reward token redemption fee, less minted pTokens
  • Add point claiming delegation function
  • Make pTokens pausable

@jparklev jparklev changed the title Dev New Features for 07/22 Audit Jul 18, 2024
@jparklev jparklev requested a review from stevenvaleri July 18, 2024 15:33
Copy link
Contributor

@stevenvaleri stevenvaleri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly comments / thoughts / preference changes. I'll make PRs for some and link in the comments.

}

emit FeesCollected(_pointsId, pTokenFee, rewardTokenFee);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fees - preference change

An alternate implementation that might afford a bit more flexibility would be to have this be an unguarded function and have a fee collector address. In this function fees would be hardcoded to go the the fee collector address. the fee collector address could be updated via a permissioned setFeeCollector() function.

This could make collecting fees a bit simpler operationally. Esp if eventually fees are collected in a treasury contract or safe.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, yea no reason it needs to be restricted then. I like that

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated a bit in #26

/// @notice Redeems rewards for point tokens
function trustClaimer(address _account, bool _isTrusted) public {
trustedClaimers[msg.sender][_account] = _isTrusted;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delegate Claim general thoughts

Initially, I thought we needed a trustClaimerBySig() .... but since the msg sender for this function is the smart wallet, this wont work.

When the wallet is created however, in the initiation script, we can potentially include a trustClaimer call so that this is setup right away in the deploy transaction.

@stevenvaleri
Copy link
Contributor

It would be nice to include the vault upgrade script in-scope of the audit as well, to help confirm the upgrade process doesn't break anything with storage, etc.

@jparklev
Copy link
Contributor Author

Mostly comments / thoughts / preference changes. I'll make PRs for some and link in the comments.

Perfect 🙇

It would be nice to include the vault upgrade script in-scope of the audit as well, to help confirm the upgrade process doesn't break anything with storage, etc.

Yes! We're using OZ's upgrades library after a note in the last audit, which should do that for us, but a good reminder to double check that

@jparklev jparklev merged commit 1865f69 into main Aug 25, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants