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

Create and fund in any authorized mint #12

Merged
merged 11 commits into from
Jun 10, 2024

Conversation

makarychev
Copy link
Collaborator

@makarychev makarychev commented Jun 8, 2024

Implementation is based on Concentrated Liquidity Market Maker (CLMM) DEX aproach.
Currently Raydium CLMM is selected as a most trustworthy decentralized provider with highest volume.

The idea that donation protocol authority authorizes CLMM program and each related pool state for new donation token ("coin"). After that we can start create fundraising and donate in authorized by authirity donation token.

CLMM is used to get token pair price between donation default token USDC and authorized one and to calculate fair earning in Donaty tokens. For example BONK price now is 1 USDC = 35000 BONK so we need to calculate reward that very close or equal to 1 USDC when user donate 35000 BONK

New methods are introduced for creation fundraising, donate and withdraw which support any SPL Token as donation mint but it is required to authorize them in advance

  • createDonationV2
  • donateV2
  • withdrawFundsV2

Added sequence diagrams for v2 flows into Readme.

@makarychev makarychev requested a review from veelenga June 8, 2024 20:32
@makarychev makarychev force-pushed the feature/create-and-fund-in-any-authorized-mint branch from 81db4bb to a026584 Compare June 8, 2024 20:34
@makarychev makarychev changed the title [WIP] Create and fund in any authorized mint Create and fund in any authorized mint Jun 10, 2024
@makarychev
Copy link
Collaborator Author

@veelenga , @tiris08 please have a look

@makarychev makarychev self-assigned this Jun 10, 2024
@makarychev makarychev merged commit 6f3e931 into main Jun 10, 2024
1 check passed
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