Skip to content

Simplifications#1

Merged
telome merged 29 commits intodevfrom
simplify
Feb 25, 2026
Merged

Simplifications#1
telome merged 29 commits intodevfrom
simplify

Conversation

@telome
Copy link
Collaborator

@telome telome commented Feb 17, 2026

No description provided.

/// @param tokenId The NFAT to fund
/// @param amount The amount of sUSDS to deposit
function fund(uint256 tokenId, uint256 amount) external roleAuth notStopped {
function fund(uint256 tokenId, uint256 amount) external {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Might be worth pointing out that if the NFAT is put on sale while funded[tokenId] > 0, the seller could frontrun the buyer to redeem the funds before the trade confirms.

Accruing the funds to the tokenId is still probably a better design than accruing the funds to ownerOf(tokenId) as that would prevent the NFAT from being held by a contract as collateral.


bool public whitelistEnabled;
mapping(address account => bool allowed) public whitelist;
string public name;
Copy link
Collaborator Author

@telome telome Feb 19, 2026

Choose a reason for hiding this comment

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

tokenURI is optional for ERC721. Currently this (and Archon's) implementation returns the empty string for tokenURI. OZ gives us a baseURI string which we could opt to make file-able, in which case tokenURI will return concat(baseURI, tokenID) once baseURI is set. This could increase the chance of the NFAT being compatible with existing NFT exchanges and protocols.

function claim(address target, uint256 amount) external roleAuth notStopped {
/// @param amount The amount of gem to issue
/// @param tokenId The token ID for the new NFAT
function issue(address target, uint256 amount, uint256 tokenId) external toll notStopped {
Copy link
Collaborator Author

@telome telome Feb 24, 2026

Choose a reason for hiding this comment

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

One question is whether we want to disallow minting tokenId == 0. Not an issue in our code but might help prevent the funder from mistakenly funding the wrong tokenId (due to an uninitialized argument) or some other hypothetical integration bugs.

@telome telome merged commit c587941 into dev Feb 25, 2026
2 checks passed
@telome telome deleted the simplify branch February 25, 2026 08:01
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.

1 participant