The Idle Pot Yield Delegation feature transforms SoroSusu from a "0% Interest Loan" into a "Yield-Generating Savings Engine" by allowing groups to delegate idle funds to Stellar liquidity pools while waiting for the end of the month. This provides a clear financial advantage over traditional physical Susu groups and maximizes capital efficiency.
- Groups can delegate idle pot funds to Stellar liquidity pools during waiting periods
- Supports multiple pool types: Stellar Liquidity Pools, Regulated Money Markets, Stable Yield Vaults
- Automatic compounding with weekly frequency
- Real-time yield tracking and distribution
- 75% quorum requirement for yield delegation approval (higher stakes than rollover)
- 80% supermajority approval threshold
- 24-hour voting period for quick decision-making
- Only active members can participate in voting
- 50/50 Split: Half of yield goes to current round's winner, half to Group Treasury
- Group Treasury funds can be used for future rollover bonuses
- Transparent distribution tracking with audit trail
- Automatic distribution upon withdrawal or compounding
- Maximum 80% of pot can be delegated (maintains liquidity buffer)
- Minimum delegation amounts to prevent micro-transactions
- Pool registry system for trusted yield sources
- Emergency withdrawal capabilities
pub struct YieldDelegation {
pub circle_id: u64,
pub delegation_amount: i128,
pub pool_address: Address,
pub pool_type: YieldPoolType,
pub delegation_percentage: u32, // Percentage of pot to delegate
pub created_timestamp: u64,
pub status: YieldDelegationStatus,
pub voting_deadline: u64,
pub for_votes: u32,
pub against_votes: u32,
pub total_votes_cast: u32,
pub start_time: Option<u64>,
pub end_time: Option<u64>,
pub total_yield_earned: i128,
pub yield_distributed: i128,
pub last_compound_time: u64,
}pub enum YieldPoolType {
StellarLiquidityPool,
RegulatedMoneyMarket,
StableYieldVault,
}pub struct YieldDistribution {
pub circle_id: u64,
pub recipient_share: i128,
pub treasury_share: i128,
pub total_yield: i128,
pub distribution_time: u64,
pub round_number: u32,
}const YIELD_VOTING_PERIOD: u64 = 86400; // 24 hours
const YIELD_QUORUM: u32 = 75; // 75% quorum (higher stakes)
const YIELD_MAJORITY: u32 = 80; // 80% supermajority
const MIN_DELEGATION_AMOUNT: i128 = 100_000_000; // Minimum 10 tokens
const MAX_DELEGATION_PERCENTAGE: u32 = 8000; // Maximum 80% of pot
const YIELD_DISTRIBUTION_RECIPIENT_BPS: u32 = 5000; // 50% to current round winner
const YIELD_DISTRIBUTION_TREASURY_BPS: u32 = 5000; // 50% to group treasury
const YIELD_COMPOUNDING_FREQUENCY: u64 = 604800; // Weekly compounding- Initiates yield delegation proposal
- Validates delegation limits and member status
- Proposer automatically votes "For"
- Emits
YIELD_DELEGATION_PROPOSEDevent
- Democratic voting on yield delegation proposals
- Prevents double voting
- Auto-approves if quorum and majority thresholds met
- Emits
YIELD_DELEGATION_VOTEevent
- Executes approved yield delegation
- Registers yield pool in registry
- Transfers funds to selected pool
- Emits
YIELD_DELEGATION_APPROVEDevent
- Manually executes delegation if needed
- Supports manual execution workflows
- Emits
YIELD_DELEGATION_EXECUTEDevent
- Compounds earned yield from pools
- Weekly compounding frequency
- Updates total yield tracking
- Emits
YIELD_COMPOUNDEDevent
- Withdraws funds from yield pool
- Final yield calculation and distribution
- Emits
YIELD_DELEGATION_WITHDRAWNevent
- Implements 50/50 yield distribution
- Transfers share to current round recipient
- Adds share to group treasury
- Emits
YIELD_DISTRIBUTEDevent
- Increased Returns: 5-15% APY on idle funds vs 0% traditional
- Capital Efficiency: Funds work while waiting for payout
- Competitive Advantage: Clear benefit over physical Susu groups
- Treasury Growth: Builds reserves for future bonuses
- Higher Effective Returns: Yield supplements regular Susu payouts
- Risk-Managed: Conservative delegation limits protect principal
- Transparent: Clear tracking of all yield activities
- Democratic Control: Group decides on participation
- Higher User Retention: Better returns keep groups engaged
- Network Effects: Yield opportunities attract new users
- Platform Revenue: Potential for yield pool partnerships
- Competitive Moat: Unique feature vs traditional savings
All Members Contribute → Round Finalized → Payout Scheduled
Round Finalized → Yield Delegation Proposed → Group Votes → Delegation Approved
Funds Delegated → Yield Compounds Weekly → Group Tracks Earnings
Yield Withdrawn → 50/50 Split → Recipient Paid → Treasury Funded
- Only active members can propose and vote
- Circle creator/admin can execute delegations
- Pool registry prevents unauthorized pool usage
- One vote per member enforcement
- Immutable vote recording
- Quorum and majority thresholds
- Maximum delegation percentage (80%) limits exposure
- Minimum delegation amounts prevent spam
- Emergency withdrawal capabilities
- Complete logging of all yield operations
- Transparent distribution tracking
- Event emissions for off-chain monitoring
// Group decides to delegate 50% of idle funds
client.propose_yield_delegation(
&member,
&circle_id,
&5000, // 50%
&pool_address,
&YieldPoolType::StellarLiquidityPool
);
// Other members vote
client.vote_yield_delegation(&member2, &circle_id, &YieldVoteChoice::For);
client.vote_yield_delegation(&member3, &circle_id, &YieldVoteChoice::For);
// Execute delegation
client.approve_yield_delegation(&circle_id);// Weekly compounding
client.compound_yield(&circle_id);// Withdraw and distribute earnings
client.withdraw_yield_delegation(&circle_id);(circle_id, proposer, delegation_amount, delegation_percentage, pool_address, voting_deadline)
(circle_id, voter, vote_choice, for_votes, against_votes)
(circle_id, delegation_amount, pool_address)
(circle_id, yield_earned, total_yield_earned)
(circle_id, total_withdrawn, total_yield_earned)
(circle_id, recipient_share, treasury_share, total_yield)
- ✅ Successful yield delegation proposal and voting
- ✅ Yield delegation rejection scenarios
- ✅ Yield calculation and compounding
- ✅ Withdrawal and distribution logic
- ✅ Edge cases and error conditions
- ✅ Integration with existing pot management
test_yield_delegation_proposal_and_voting()- Complete success scenariotest_yield_delegation_rejection()- Failure case validation
- Auto-selection of highest APY pools
- Risk-based pool recommendations
- Yield aggregation across multiple pools
- Customizable split ratios
- Performance-based distribution
- Treasury investment strategies
- Integration with major DeFi protocols
- Automated yield farming strategies
- LP token rewards support
- Yield volatility protection
- Insurance options for delegated funds
- Stop-loss mechanisms
The Idle Pot Yield Delegation feature represents a significant advancement for the SoroSusu protocol, transforming it from a simple rotating savings mechanism into a sophisticated yield-generating platform. By enabling groups to earn returns on idle funds while maintaining the core Susu values of community savings and mutual support, this feature provides a compelling competitive advantage over traditional savings groups and positions SoroSusu as a leader in decentralized finance innovation on the Stellar network.
The combination of democratic governance, risk management, and fair distribution ensures that the feature enhances user value while maintaining the security and transparency that users expect from the SoroSusu protocol.