From 4172549f6daa9262672c71dcefe455a4834d6676 Mon Sep 17 00:00:00 2001 From: Bobby Fiando Date: Sun, 24 Nov 2024 10:13:32 +0700 Subject: [PATCH] WIP: smart contract docs --- README.md | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index b13dc38..c5d484b 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,8 @@ +# Eduena + +## Eduena Frontend +[Eduena Frontend](https://github.com/Eduena-Endownment-Fund/eduena-web) + ## Eduena Smart Contract The `Eduena` smart contract is an ERC20 token that allows users to deposit and withdraw USDe tokens, stake them to earn yield, and distribute yield. It includes the following key functions: @@ -6,8 +11,8 @@ The `Eduena` smart contract is an ERC20 token that allows users to deposit and w #### Functions -- **deposit(uint256 amount)**: Allows users to deposit a specified amount of USDe tokens. The equivalent amount of Eduena tokens (EDN) is minted and assigned to the user. -- **withdraw(uint256 shares)**: Allows users to withdraw a specified amount of Eduena tokens (EDN). The equivalent amount of USDe tokens is transferred back to the user. +- **deposit(uint256 amount)**: Allows users to deposit a specified amount of USDe tokens and it immediately staked to sUSDe. The equivalent amount of Eduena tokens (EDN) is minted and assigned to the user. +- **withdraw(uint256 shares)**: Allows users to withdraw a specified amount of Eduena tokens (EDN). The equivalent amount of sUSDe tokens is transferred back to the user. - **distribute(address recipient, uint256 amount)**: Distributes a specified amount of yield to a recipient. - **updateYield()**: Updates the yield based on the current asset value in USDe. @@ -27,7 +32,7 @@ The `Eduena` smart contract is an ERC20 token that allows users to deposit and w - **ExceedsUnclaimedYield()**: Thrown when the amount exceeds the unclaimed yield. - **NotEligibleForScholarship()**: Thrown when a user is not eligible for a scholarship. -### Testing +#### Testing The `EduenaTest` contract in `test/Eduena.t.sol` includes tests for the deposit and withdrawal functionalities. @@ -42,5 +47,4 @@ function testWithdraw() public { function testDistributeScholarship() public { // Test distribute scholarship functionality -} -``` \ No newline at end of file +} \ No newline at end of file