solace-fi / solace-core

solace.fi smart contracts
GNU General Public License v3.0
6 stars 3 forks source link

Treasury - Route Refunds #151

Closed leonardishere closed 3 years ago

leonardishere commented 3 years ago

Treasury.routePremiums() in reverse

instead of actively pulling, record an accounting variable refundDebt and repay it with routePremiums()

or get rid of it for V1, always route to/from the vault, and add more functions in V2

leonardishere commented 3 years ago

Treasury.routePremiums() will send 100% to Vault Treasury.refund() should pull from Vault.requestEth() requestEth() needs to be modified to accept msg.sender == claimsEscrow or treasury https://github.com/solace-fi/core/blob/main/contracts/Vault.sol#L362