Skip to content

Comments

feat: delayed first mint#1187

Draft
DhairyaSethi wants to merge 13 commits intodevfrom
rft/delayed-first-mint
Draft

feat: delayed first mint#1187
DhairyaSethi wants to merge 13 commits intodevfrom
rft/delayed-first-mint

Conversation

@DhairyaSethi
Copy link
Member

No description provided.

Comment on lines 205 to 214
(uint256 feeAmount, uint256 feeShares) = asset.getFee(drawnIndex, previousIndex);
if (feeShares > 0) {
address feeReceiver = asset.feeReceiver;
asset.addedShares += feeShares;
spokes[assetId][feeReceiver].addedShares += feeShares;
asset.realizedFees = 0;
asset.addedShares += feeShares.toUint120();
spokes[assetId][feeReceiver].addedShares += feeShares.toUint120();
emit IHub.AccrueFees(assetId, feeReceiver, feeShares);
} else {
asset.realizedFees = feeAmount.toUint120();
}
Copy link
Member Author

@DhairyaSethi DhairyaSethi Feb 4, 2026

Choose a reason for hiding this comment

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

actually i think this logic needs to be replicated exactly on the preview also

Copy link
Member Author

@DhairyaSethi DhairyaSethi Feb 4, 2026

Choose a reason for hiding this comment

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

bc rn preview will think dust fee is donated whereas accrue will set it aside

Copy link
Contributor

Choose a reason for hiding this comment

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

You mean to replicate it without changing state?

@miguelmtzinf miguelmtzinf changed the base branch from rft/mint-fee-shares-2 to dev February 5, 2026 11:35
//
uint120 addedShares;
uint120 swept;
uint120 realizedFees;
Copy link
Member

Choose a reason for hiding this comment

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

let's revert if gas costs are not impacted.

/// @param assetId The identifier of the asset.
/// @param spoke The address of the current feeReceiver.
/// @param shares The amount of shares accrued.
event AccrueFees(uint256 indexed assetId, address spoke, uint256 shares);
Copy link
Member

Choose a reason for hiding this comment

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

why this instead of MintFeeShares

Copy link
Member Author

Choose a reason for hiding this comment

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

it's what we had before & avoids confusion

event UpdateAsset(
uint256 indexed assetId,
uint256 drawnIndex,
uint256 drawnRate,
Copy link
Member

@miguelmtzinf miguelmtzinf Feb 5, 2026

Choose a reason for hiding this comment

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

we wanted to emit the drawnRate too, iirc

Copy link
Member Author

Choose a reason for hiding this comment

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

we still do, only the last param ie realised fees is removed

return asset.addedShares + asset.unrealizedFeeShares();
}

/// @notice Returns the total added shares for the specified asset at specified indices.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
/// @notice Returns the total added shares for the specified asset at specified indices.
/// @notice Returns the total added shares for the specified asset and drawn indices.

}

/// @notice Returns the total amount owed for the specified asset, including drawn and premium.
/// @notice Returns the total amount owed for the specified asset at specified drawnIndex.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
/// @notice Returns the total amount owed for the specified asset at specified drawnIndex.
/// @notice Returns the total amount owed for the specified asset and drawn index.

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.

3 participants