Create and fund in any authorized mint #12
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
= 35000BONK
so we need to calculate reward that very close or equal to 1USDC
when user donate 35000BONK
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
Added sequence diagrams for v2 flows into Readme.