drift-labs / drift-vaults Goto Github PK
View Code? Open in Web Editor NEWa vault program on top of protocol-v2 for delegate-managed trades with customizable terms
a vault program on top of protocol-v2 for delegate-managed trades with customizable terms
We going to create a open source socialFi for slide.
We want to add a flag to find easy if the vault is created by Slide
https://github.com/slide-labs/slide-socialfi
it's helpfully if add a memo
#[assert_no_slop]
#[account(zero_copy)]
#[derive(Default, Eq, PartialEq, Debug)]
#[repr(C)]
pub struct Vault {
/// The memo of the vault. (e. g Slide - Vault)
pub memo: [u8; 32],
sharing thoughts on topic raise by both @dannpl and @wphan
vault.total_shares = 0
and vault.init_ts - now > MIN_VAULT_LIFETIME
, then let anyone close out vault (and associated user account through cpi call)vault.total_shares
can get to 0 (rather than dust) should be examined during testingIssue Summary:
Current implementation of the Drift-Vaults program, as described in the wiki, requires significant trust from depositors towards both the vault manager and delegate. In addition, vault managers need to trust the delegate. Although certain incentives and penalties are in place, potential weaknesses and vulnerabilities may still exist. There is a need to explore additional strategies to enhance the robustness of the trust model.
Detailed Description:
Presently, the vault manager earns management fees and profit shares, providing an incentive to attract deposits and maintain good performance. However, this structure relies on the depositor's trust in the manager's ability to deliver sustainable returns. While historical performances provide some degree of assurance, they are insufficient in guaranteeing future outcomes. If the manager and delegate roles were managed via upgradable time-delayed smart contracts, this could improve deterministic properties of the system.
Still some potential vulnerabilities exist that could undermine trust. Some potential enhancements to address these concerns (that I believe are more complex than the guarantees they provide):
Mandatory Excessive Manager Collateral: This solution requires the manager to provide substantial collateral as a guarantee. However, it is challenging to enforce and requires the manager to provide large upfront capital, somewhat negating the purpose of the vault program.
Delegate Instruction Introspection: This solution involves monitoring and evaluating the delegate's instructions to prevent potentially detrimental actions. However, defining 'bad orders' is non-trivial, and excessive restrictions could inadvertently limit strategies for preventing loss.
Custom Approved Counterparty Lists: Allowing users to create a list of approved counterparties for trades could enhance trust. However, the risk of collusion between the manager and an approved counterparty, if not the vAMM, could offset its benefits.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.