Skip to content

Latest commit

 

History

History
35 lines (23 loc) · 2.66 KB

README.md

File metadata and controls

35 lines (23 loc) · 2.66 KB

🪓 PaySplit

Imagine if an employee of a web2-based company is trying to buy a ticket to a work conference and the company wants to reimburse a part of that cost to the employee. That would take submitting checks to the financial department, taking up valuable company time and would cause a the amount of paperwork would frustrate any person. Pay Split is a Safe{Protocol} plugin that allows the employer to set limits to financial reimbursement, and employees to choose where to spend them, saving both parties lots of paperwork and nerves.

We leverage the new Safe{Core} Protocols to automate every part of the process, of both accepting, calculating and rerouting assets. The limits are set as a parameter to the smart contract. An external call to a users wallet is made through a metamask boilerplate. We started considering and implementing crosschain interoperability through Axelar - so that plugin functionality can be accessed from any chain.

📊 Structure

  • contracts - contains plugin smart contracts, deployed through hardhat
  • web - contains web interface for the plugin, automatically deployed to github-pages. Deployed with yarn.
  • web/payer - contains a bolierplate metamask wallet connection to simulate a user wallet. Deployed with yarn.

🔗 Principal of work (single chain)

  1. The owner of the contract sets the reimbursement rate.
  2. The employee initiates the payment to a third party.
  3. Employees money accumulates on the plugin account.
  4. The requestet transaction is sent to the third party from the SAFE Wallet.
  5. All the funds from the plugin account can be "drained" to the SAFE Wallet on request of the owner.

🔗 Related Links

Linea Smart contract transaction path:

  1. sender on Linea
  2. axelar gateway
  3. the other side of the gateway
  4. plugin contract on gateway

https://goerli.etherscan.io/tx/0xd8295d845d0b94810dee5152dfe1e4a7e14eae71adbc43f319bd01007053c3fe - transaction to the plugin on the other side

Linea deployment RPC - a requirement for Linea bounty