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

Update allocation function #245

Merged
merged 3 commits into from
May 8, 2024
Merged

Update allocation function #245

merged 3 commits into from
May 8, 2024

Conversation

DavideSilva
Copy link
Member

@DavideSilva DavideSilva commented May 8, 2024

Why:

  • The allocation function in the Sale contract needs to take into
    consideration the sale not reaching the maximum target. In that
    scenario, Rising Tide does not trigger and we follow a curve to
    calculate the token price based in the total amount commited

How:

  • Adding a function that calculates the current token price based on the
    amount contributed
  • Adding minPrice and maxPrice to limit the price of the token
  • Updating the allocation function to consider the below max target
    case

Copy link

netlify bot commented May 8, 2024

Deploy Preview for ctznd ready!

Name Link
🔨 Latest commit 69a2270
🔍 Latest deploy log https://app.netlify.com/sites/ctznd/deploys/663b605ee4e91c0008db5c06
😎 Deploy Preview https://deploy-preview-245--ctznd.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@DavideSilva DavideSilva changed the title ds/allocation Update allocation function May 8, 2024
Why:
* The `allocation` function in the Sale contract needs to take into
  consideration the sale not reaching the maximum target. In that
  scenario, Rising Tide does not trigger and we follow a curve to
  calculate the token price based in the total amount commited

How:
* Adding a function that calculates the current token price based on the
  amount contributed
* Adding `minPrice` and `maxPrice` to limit the price of the token
* Updating the `allocation` function to consider the below max target
  case
@DavideSilva DavideSilva merged commit 62867aa into main May 8, 2024
7 checks passed
@DavideSilva DavideSilva deleted the ds/allocation branch May 8, 2024 11:26
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