I creating a smart contract for manage loans and I am searching some way to make me sure when the borrower defaulted pay back the loan, seizing some percentage of ether from the guarantor's account.
Is this possible?
Thanks in advance.
Ethereum Stack Exchange is a question and answer site for users of Ethereum, the decentralized application platform and smart contract enabled blockchain. It only takes a minute to sign up.Sign up to join this community
You can't remove anything from the guarantors account without their permission. What you could do is to let the smart contract remove a percentage of the loan after the borrower payed it back to your smart contract before sending it back to the guarantor.
An external wallet account cannot be taken from.
That said, you can require a lockup of funds,
staking, in a smart contract that is held as collateral. A simple escrow agreement.
When default occurs, then the smart contract the loan is held in can retrieve the funds from the other smart contract.
As already mentioned, you can't just take Ether from the borrower's account.
If I understood correctly, you are thinking of a smart contract which gives our Ether loans. This should work pretty similarly to a normal bank loan except everything is automatic - the borrower needs to store some collateral.
What sort of collateral you accept is up to you. If the point is to borrow Ethers you probably shouldn't try to ask Ethers as collateral. Maybe some ERC20 tokens?
There are some similar services out there already, for example ethlend.