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

DEX improvements #14

Open
whoabuddy opened this issue Jan 13, 2025 · 0 comments
Open

DEX improvements #14

whoabuddy opened this issue Jan 13, 2025 · 0 comments

Comments

@whoabuddy
Copy link
Contributor

Noting some things we see along the way that can be improved, especially in the context of them being deployed in the DAO.

  1. constant token-supply can call get-total-supply in token contract
  2. constants VIRTUAL_STX_VALUE and COMPLETE_FEE could be computed inline (20% and 2%)
  3. constant BURN_ADDRESS can be removed in favor of calling ft-burn? in the token contract
  4. in initialization, token-balance could be set by calling get-balance in the token contract for (as-contract tx-sender)

These optimizations take advantage of the token contract being deployed first so we can create functions that call it versus using a sip-010 trait and matching value.

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

No branches or pull requests

1 participant