How to proceed
Data Table: Outline what data each part of the system will rely on.
Wireframes: Describe main screens/flows for the user portal (in text for review, can be turned into diagrams).
Technical Details: Components, data flow, and logic of the platform.
Draft Smart Contract Architecture: Specify major contracts, key functions/events, and relationships.
Key Data Involved
User Address
Ethereum wallet address of user
Identifies user across contracts
Debt Amount
Amount lost in original protocol
Determines vgd to mint
vgd (Vested GD) Balance
User’s unvested (locked) and vesting GD tokens
Vesting and claimable state
GD Balance
Claimable/redeemed GD token balance
For staking, trading, governance
Vesting Schedule Per User
Vesting start, duration, claimed amount
Unlock tracking
Treasury Holdings
Assets (e.g., DAI, ETH) backing GD
Calculating backing, transparency
Staked GD
User’s staked GD for rebasing
Staking rewards, APY calculation
GD Price & Backing Per Token
Dynamic value per protocol status
User dashboard, oracle feeds
Bonding Info
Discount, input asset, vesting periods
Protocol expansion mechanism
2. Wireframes (Textual Flow)
A. Dashboard/Home
Wallet Connect button
Overview cards:
Total original debt
vgd (Vested GD): locked, unlock schedule, claimable
GD: claimable, staked
Staking APY
Backing per GD (protocol reserves per token)
CTA: “Claim GD” if available
B. Debt/Vesting Page
Table:
Debt ID | Amount | Vested GD | Unlock Progress | Next Vesting Claim | Claim Button
Vesting schedule graph (linear or custom unlock curve)
FAQ about vesting and redemption terms
C. Staking Page
GD Staked: Amount, APY, Rewards earned
“Stake More” & “Unstake” actions
Historical staking rewards table
D. Bonding Page (if using bonding mechanism)
List available bonds: Asset type (e.g., ETH, DAI), Discount Rate, Duration
Bond input amount, receive GD estimate
Bond progress/claim schedule
E. Treasury Page
Assets held
Backing per GD stats
Explorer for all protocol holdings & audit logs
F. Governance (Optional)
Proposals
Vote delegation
3. Technical Details/Components
Smart Contracts
VGDVesting: Manages vgd minting, vesting schedule, user claims
GDToken: ERC20, rebasing (staking/interests), mint/burn control
Staking: Lock GD, distribute rebase rewards/APY
Bonding: Accept asset/discounts for locked GD minting, accrue to treasury
Treasury: Holds reserves, verifies GD backing, manages outflows
Governance (Optionally): Handles parameter changes
Oracle (Externalized): Tracks market price of reserves
Frontend
React/NextJS UI
Web3 wallet connect
Dashboard with vesting, staking, bonding modules
Real-time treasury dashboard (subgraph/api for contracts)
Claim and stake flows, modals for actions
Backend/Indexing
The Graph or custom indexer for events: debt conversions, vesting, staking, treasury movements.
4. Smart Contract Architecture (Solidity Outline)
Here’s a simplified starter code layout for your system:
// SPDX-License-Identifier: MIT pragma solidity ^0.8.19;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol";
// --- GD Token --- contract GDToken is ERC20, Ownable { address public stakingContract; address public vestingContract; address public treasury; bool public rebasingEnabled;
}
// --- vgd (Vested GD) Vesting --- contract VGDVesting is Ownable { GDToken public gd; struct Vesting { uint256 total; uint256 claimed; uint256 start; uint256 duration; } mapping(address => Vesting) public vests;
}
// --- Staking Contract --- contract GDStaking is Ownable { GDToken public gd; mapping(address => uint256) public staked; uint256 public rewardRate; // ...rewards & rebase logic...
text
}
// --- Treasury (Simplified) --- contract GDTreasury is Ownable { mapping(address => uint256) public reserves; event ReserveAdded(address token, uint256 amount);
text
}
// --- Bonding (Discount for Depositing Asset, Simplified) --- contract GDBonding is Ownable { GDTreasury public treasury; GDToken public gd; // bond params, issue/claim, vesting logic // Omitted for brevity }
This architecture gives you:
Mintable GD with owner/DAO governance;
Vesting contract for vgd → GD redemption with schedules and claims;
Staking contract for rebase rewards (add reward logic as needed);
Treasury for protocol reserves/backing;
(Optional) Bonding logic for reserves expansion.
Last updated