The following technical test has been designed to demonstrate skills of our senior solidity developers.
For this challenge you must develop the project according to the guidelines
- Fork this repository with your GitHub account
- Commit regularly to check your progress
- Email us the repository URL
The goal of this phase is to develop a set of smart contracts that conforms to a given interface and passes a given test suite.
- Build a smart contract system that can be used as a simple saving system.
- Tropykus provides the interface that MUST be used for the implementation
- Tropykus will provide a test suite available through this base repository.
In the following text, we use the terms "user" and "bank customer" interchangeably. The functional requirements must be satisfied by the implementation of the smart contracts.
- A bank customer's account is represented by their wallet address.
- A bank customer must be able to deposit an amount higher than 0 of tokens into their own account. Deposits can be made on ETH solely for the purpose of this challenge.
- A bank customer must be able to withdraw only up to the amount deposited into their own account plus any interest accrued.
- The interes rate on deposits is 3% per 100 blocks. If a user withdraws their deposit earlier or later than 100 blocks, they will receive a proportional interes amount.
- A bank customer must be able to deposit as many times as they wish into the same account, and if so, the interes should be accounted for each time deposit and withdraw are called by the user.
- The smart contract must have plenty ETH to subsidy the interest accrued by the user (Note: This is where this test gets shorter, we eliminated the collateral, borrowing and repay borrow functionalities).
- Each state-changing function defined in the
IBank
interface, must emit the corresponding event defined at the top of that interface with the correct parameters as specified in the code comments for each event.
- The implementation MUST use Solidity version 0.8.0. Neither other specific version is going to be considered nor a range that even includes the specified version.
The interface has been provided at the contracts folder.