Skip to content

Allocator contract for deposits into the Midas Vault #947

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

nkuba
Copy link
Collaborator

@nkuba nkuba commented Jul 2, 2025

The MidasAllocator contract is a simple allocator that deposits tBTC to the
Midas Vault and holds the shares minted by the Vault.

The Vault is expected to be implemented by the Midas team according to the
IVault interface, to wrap their own vault contracts. As their setup uses two
distinct vaults for deposits and redemptions, in addition to a separate shares
token contract.

This implementation doesn't cover the withdrawal functionality, as it will
be built on top of the queued withdrawals functionality.

Copy link

netlify bot commented Jul 2, 2025

Deploy Preview for acre-dapp ready!

Name Link
🔨 Latest commit ab2fac2
🔍 Latest deploy log https://app.netlify.com/projects/acre-dapp/deploys/687044e9624fce000832babc
😎 Deploy Preview https://deploy-preview-947--acre-dapp.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link

netlify bot commented Jul 2, 2025

Deploy Preview for acre-dapp-testnet ready!

Name Link
🔨 Latest commit ab2fac2
🔍 Latest deploy log https://app.netlify.com/projects/acre-dapp-testnet/deploys/687044e9e08841000877e43a
😎 Deploy Preview https://deploy-preview-947--acre-dapp-testnet.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@nkuba nkuba changed the title WIP: MidasAllocator WIP: MidasAllocator for deposits Jul 2, 2025
@nkuba nkuba requested a review from aliberkhsl July 2, 2025 21:47
@nkuba nkuba self-assigned this Jul 2, 2025
@nkuba nkuba marked this pull request as draft July 2, 2025 21:47
@nkuba nkuba force-pushed the midas-allocator branch from 335dca8 to 957f0b0 Compare July 9, 2025 22:27
nkuba added 4 commits July 11, 2025 00:47
The contract is extracted from the MezoAllocator contract. It contains parts
related to the maintainer roles.
…location

The MidasAllocator contract is a simple allocator that deposits tBTC to the
Midas Vault and holds the shares minted by the Vault.

The Vault is expected to be implemented by the Midas team according to the
IVault interface, to wrap their own vault contracts. As their setup uses two
distinct vaults for deposits and redemptions, in addition to a separate shares
token contract.

This implementation doesn't cover the withdrawal functionality, as it will
be built on top of the queued withdrawals functionality.
The scripts deploy the MidasAllocator contract and update the stBTC contract
to use the new allocator.
@nkuba nkuba force-pushed the midas-allocator branch from 957f0b0 to ae020b8 Compare July 10, 2025 22:52
@nkuba nkuba requested a review from pdyraga July 10, 2025 22:53
@nkuba nkuba marked this pull request as ready for review July 10, 2025 22:53
@nkuba nkuba changed the title WIP: MidasAllocator for deposits Allocator contract for deposits into the Midas Vault Jul 10, 2025
tbtc.balanceOf(address(stbtc))
);

// TODO: Revisit when working on queued withdrawals as part of the balance

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

queued withdrawals will be handled in different contract so not relavant anymore cause this contract won't hold withdrawn assets from midas anymore @nkuba

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants