sunrise-stake / app

A proxy around Solana Stake Pools that diverts yield to public goods programs
https://app.sunrisestake.com
12 stars 5 forks source link

Feature Request: Treasury controller program #16

Open dankelleher opened 1 year ago

dankelleher commented 1 year ago

At the moment, the yield earned by sunrise is being sent to a DAO treasury, to be used to manually purchase carbon tokens or be routed to climate projects. Spending from this treasury account, therefore, needs to happen via a DAO proposal.

The plan is for spending to be automatic and permissionless, i.e. a "crank" operation that buys and burns carbon tokens from a market every x days, or when the balance reaches a certain amount.

For this task:

Note, if the market is denominated in USDC, the program will need to swap SOL for USDC before purchasing NCT.

Intermediary step: Initially, rather than adding the complexity around markets, we manually purchase NCT, and store them in a Token Account. A PDA owned by the program would be a delegate on this account, and each crank, the program would just burn balance * proportion of them.

Rhovian commented 1 year ago

For the intermediary step above, is the token account which stores the NCT for burning owned by the treasury, or would we still want to transfer the leftover tokens to a different address?