donaty-io / donaproto

Apache License 2.0
2 stars 0 forks source link

Create and fund in any authorized mint #12

Closed makarychev closed 4 months ago

makarychev commented 4 months ago

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

Added sequence diagrams for v2 flows into Readme.

makarychev commented 4 months ago

@veelenga , @tiris08 please have a look