Diagram: User Interaction Flow (Description)
Here's a visual breakdown for rendering the flow diagram:
[User Wallet]
|
|--- (1) Deposit Stablecoin (USDC) --->
|
[DeraEngine Contract]
|
|--- Validate Token Address & User Approval
|--- Split Amount by Allocation %
|
|--- For Each Pool:
|
|--- Deposit into pool or vault
|
|--- (2) Mint DERA Token to User ---> [DERA1 Contract]
|
|--- (3) Passive Yield Accrual Over Time
|
|--- (4) User Calls Burn to Redeem
|
|--- Withdraw Funds from Connectors
|
|--- Send USDC to User Wallet
Interest allocation: What the connector contracts do
Interest is generated and stored in the form of LP tokens in connector contracts (e.g., Aave pools). Each connector tracks:
-
LP token balance
-
Pool value
Withdrawn interest is routed through the withdrawPerformanceFee
function and distributed to the fee recipient.
"Fund/allocation management" Parameters Dera can adjust/Admin function
The protocol admin, via DeraAdmin
, controls fund routing through a limited set of callable functions.
Adding/removing pools
-
addProtocolPool
: Adds a new pool with zero allocation. -
removePool
: Withdraws capital and removes the pool from storage.
Setting allocations
setProtocolPoolAllocation
: Assigns percentage values across pools.
Re-allocating
- Re-allocation is achieved by updating percentages and withdrawing/redepositing funds.
Granting and revoking of roles
- Admin can assign delegate permissions or revoke them via standard access control patterns.
All operations are logged via events and access control is restricted to specific roles with custom access modifiers.
Pool allocations:
Dera uses an allocation-based architecture to diversify investment risk across multiple DeFi protocols. Allocation percentages are configurable by the protocol admin and are stored per pool using the ProtocolPool struct.
Pool 1: Protocol description, contract addresses, percentage
-
Protocol: Aave (aTokens)
-
Contract Address:
0x98C23E9d8f34FEFb1B7BD6a91B7FF122F4e16F5c (aUSDC)
-
Allocation: 70% (example)
-
Deposits USDC in Aave aUSDC Pool
-
Tracks
netUnderlyingAssetDeposits
andcurrentYield
for fee accounting.
Yield: Accrued directly via Aave pool token rebasing.
Pool 2: Protocol description, contract addresses, percentage
-
Protocol: Fluid (fTokens)
-
Contract Address:
0x9Fb7b4477576Fe5B32be4C1843aFB1e55F251B33 (fUSDC)
-
Allocation: 30% (example)
-
Deposit stablecoins.
-
Tracks
netUnderlyingAssetDeposits
andcurrentYield
for fee accounting. Share price is determined by Fluid and can be checked withgetPricePerShare
Yield: Accrued via the increase in LP token value
This multi-pool strategy minimizes dependence on one DeFi source and improves yield stability.