Open saltyfacu opened 3 years ago
Its possible tokens were present before the delegateDeposit function was called, this will give ownership of the tokens to the person calling transfer.
https://github.com/coordinape/coordinape-protocol/blob/feat/V1/contracts/ApeRouter.sol#L42
Is it expected to be the yearn governance that set the registry?
https://github.com/coordinape/coordinape-protocol/blob/feat/V1/contracts/ApeRouter.sol#L57
Could you add a test with a vault that gets loss? I can see something like this line breaking: https://github.com/coordinape/coordinape-protocol/blob/feat/V1/contracts/wrapper/ApeVault.sol#L55
Message by @cesarsld
So an apeVault owner, now, can only deposit funds into the vault via the apeRouter. Once it is done, the router, calls the yearn vault assigned to the apeVault and deposits the want token. By doing so it also emits an event saying which apeVault was funded and what yearn vault was used, and how many vault shares were minted
From now on, there's only 2 ways to have funds being taken away from the apeVault.
1) apeVault owner withdraws some or all vault shares from the vault. This would emit an event saying how many yearn vault shares were redeemed and removed
2) apeDistributor (circle using the funds) would take the funds to the distributor contract. An event would say how many yearn vault shares were used by which apevault so you can easily track tvl across all coordinape vaults Would this suffice to help you track the TVL for the yearn partnership program?
Scope
https://github.com/coordinape/coordinape-protocol/blob/feat/V1/contracts/ApeRouter.sol For deposits
https://github.com/coordinape/coordinape-protocol/blob/feat/V1/contracts/wrapper/ApeVault.sol For withdrawals
https://github.com/coordinape/coordinape-protocol/blob/feat/V1/contracts/ApeDistributor.sol For Withdrawal via circles