Skip to content
This repository was archived by the owner on Nov 11, 2025. It is now read-only.

feat: add max supply cap validation#252

Merged
dimlbc merged 5 commits intomainfrom
feat/add-max-supply-cap-alert
Oct 8, 2025
Merged

feat: add max supply cap validation#252
dimlbc merged 5 commits intomainfrom
feat/add-max-supply-cap-alert

Conversation

@dimlbc
Copy link
Member

@dimlbc dimlbc commented Oct 6, 2025

https://dhedge-workspace.slack.com/archives/C02APSH0E74/p1759390128596059

The design is from storybook and may differ from the actual one on Toros

Screenshot 2025-10-06 at 17 47 08

@dimlbc dimlbc requested review from D-Ig and artsiomYavorski October 6, 2025 16:29
@edsonayllon
Copy link
Member

https://dhedge-workspace.slack.com/archives/C02APSH0E74/p1759390128596059

The design is from storybook and may differ from the actual one on Toros

Screenshot 2025-10-06 at 17 47 08

Make it yellow, not red.

Also let's update the text to the following:

Supply caps reached
Can only buy $12,000 more

@dimlbc
Copy link
Member Author

dimlbc commented Oct 8, 2025

@edsonayllon The problem is that during a deposit some amount of fees may be minted, which makes it quite hard to calculate the exact amount

I’ll add it, but the amount might not be accurate

UPD: added 100 vault tokens gap to calculations

image

@dimlbc dimlbc force-pushed the feat/add-max-supply-cap-alert branch from 462dad6 to a71ebaf Compare October 8, 2025 09:10
@dimlbc dimlbc requested a review from edsonayllon October 8, 2025 09:10
@dimlbc
Copy link
Member Author

dimlbc commented Oct 8, 2025

@artsiomYavorski @edsonayllon @D-Ig replaced hardcoded 100 vault tokens gap with dynamic calculateAvailableManagerFee contract call to make it accurate

chainId,
abi: PoolLogicAbi,
functionName: 'calculateAvailableManagerFee',
args: [BigInt(totalSupplyD18 ?? '0')],
Copy link
Member

Choose a reason for hiding this comment

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

totalValue should be passed instead, not supply

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed

@dimlbc dimlbc merged commit 2a465f3 into main Oct 8, 2025
1 check passed
@dimlbc dimlbc deleted the feat/add-max-supply-cap-alert branch October 8, 2025 16:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants